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>
This commit is contained in:
Victor Orlikowski 2016-08-02 11:01:52 +09:00 committed by FUJITA Tomonori
parent d0992e24ae
commit 9ee265ab45

View File

@ -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):