From 567cb2c364479068c86a49044f8aff739de69333 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 4 Feb 2012 20:30:52 +0900 Subject: fix datapath disconnection cleanup After the datapath connection is close, we call gevent.joinall for ev_thr and send_thr greenlets to wait for the completion of them. However, gevent.joinall will block forever since the greenlets sleep. We can put some junk to the queues to wake them but looks like just killing the greenlets is simpler. Signed-off-by: FUJITA Tomonori --- ryu/controller/controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index c370b5d0..79754e8b 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -154,6 +154,8 @@ class Datapath(object): self.send_msg(hello) self._recv_loop() + gevent.kill(ev_thr) + gevent.kill(send_thr) gevent.joinall([ev_thr, send_thr]) @_deactivate -- cgit v1.2.3