A quick patch to clean up stale Datapath objects in the ofctl_service application.
Signed-off-by: Victor J. Orlikowski <[email protected]> --- diff --git a/ryu/app/ofctl/service.py b/ryu/app/ofctl/service.py index 0ca00c7..19aebd4 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): Best, Victor -- Victor J. Orlikowski <> vjo@[cs.]duke.edu
ofctl_dpid_cleanup.patch
Description: ofctl_dpid_cleanup.patch
------------------------------------------------------------------------------
_______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
