diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-02-04 20:30:52 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-02-05 15:41:30 +0900 |
commit | 567cb2c364479068c86a49044f8aff739de69333 (patch) | |
tree | c3472e8460f753e24a0d71975172b3cb743057ad | |
parent | 9f022847cd8e747ba08b0949f1b89c04d48632b0 (diff) |
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 <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/controller/controller.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |