From ac849e3d4facb0833aa43cb73cecf7cd02f38c80 Mon Sep 17 00:00:00 2001 From: J vanBemmel Date: Sun, 5 Sep 2021 20:09:16 -0500 Subject: [PATCH] Fix major bug in child thread cleanup logic Without this fix, one cannot restart BGP Speaker instances --- ryu/services/protocols/bgp/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/services/protocols/bgp/base.py b/ryu/services/protocols/bgp/base.py index 8b69aa36..52a8398d 100644 --- a/ryu/services/protocols/bgp/base.py +++ b/ryu/services/protocols/bgp/base.py @@ -285,7 +285,7 @@ class Activity(object): """Stops all threads spawn by this activity. """ for thread_name, thread in list(self._child_thread_map.items()): - if name is not None and thread_name is name: + if name is None or thread_name == name: LOG.debug('%s: Stopping child thread %s', self.name, thread_name) thread.kill()