summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVictor Orlikowski <vjo@duke.edu>2016-08-02 11:01:52 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-02 11:01:52 +0900
commit9ee265ab4535d6995d99cbee6bcfc344be411e77 (patch)
treea4afca9ae9c567c90323fcaf20095fbeac4485dd
parentd0992e24aea897920c25099aa841048e2e740cca (diff)
Clean up stale Datapath objects in the ofctl_service application
A quick patch to clean up stale Datapath objects in the ofctl_service application. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/app/ofctl/service.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ryu/app/ofctl/service.py b/ryu/app/ofctl/service.py
index 0ca00c71..19aebd4b 100644
--- a/ryu/app/ofctl/service.py
+++ b/ryu/app/ofctl/service.py
@@ -79,6 +79,8 @@ class OfctlService(app_manager.RyuApp):
self.logger.debug('add dpid %s datapath %s new_info %s old_info %s',
id, datapath, new_info, old_info)
self._switches[id] = new_info
+ if old_info:
+ old_info.datapath.close()
@set_ev_cls(ofp_event.EventOFPStateChange, DEAD_DISPATCHER)
def _handle_dead(self, ev):