summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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):