diff options
author | Victor Orlikowski <vjo@duke.edu> | 2016-08-02 11:01:52 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-08-02 11:01:52 +0900 |
commit | 9ee265ab4535d6995d99cbee6bcfc344be411e77 (patch) | |
tree | a4afca9ae9c567c90323fcaf20095fbeac4485dd | |
parent | d0992e24aea897920c25099aa841048e2e740cca (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.py | 2 |
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): |