Also attached as gzip in case the inline does not work well. Signed-off-by: Jerry Cen <[email protected]> From: Jerry Cen <[email protected]> Date: Mon, 15 Jun 2015 14:27:46 -0700 Subject: [PATCH] Clean up server socket and thread when shutting down
---
ryu/services/protocols/bgp/base.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ryu/services/protocols/bgp/base.py
b/ryu/services/protocols/bgp/base.py
index 94c2bc9..aac0fe6 100644
--- a/ryu/services/protocols/bgp/base.py
+++ b/ryu/services/protocols/bgp/base.py
@@ -275,7 +275,7 @@ class Activity(object):
LOG.debug('%s: Stopping child thread %s',
self.name, thread_name)
thread.kill()
- del self._child_thread_map[thread_name]
+ self._child_thread_map.pop(thread_name, None)
def _close_asso_sockets(self):
"""Closes all the sockets linked to this activity.
@@ -375,11 +375,13 @@ class Activity(object):
server = None
for sa in listen_sockets.keys():
name = self.name + '_server@' + str(sa[0])
+ self._asso_socket_map[name] = listen_sockets[sa]
if count == 0:
import eventlet
server = eventlet.spawn(self._listen_socket_loop,
listen_sockets[sa], conn_handle)
+ self._child_thread_map[name] = server
count += 1
else:
server = self._spawn(name, self._listen_socket_loop,
--
2.2.0.rc0.207.ga3a616c
0001-Clean-up-server-socket-and-thread-when-shutting-down.patch.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------
_______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
