mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-14 00:56:37 +02:00
controller: fix that sender thread is never terminated
Empty q.get() is blocking send thread.
Because of this issue, datapath state never transit to DEAD.
This fixes commit 83e3709a0d70f889e794d1c5f70c1c1eb73075f7.
- controller: fix send_q draining
83e3709a0d
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
19a8d21636
commit
b083da401f
@ -196,10 +196,7 @@ class Datapath(object):
|
||||
buf = self.send_q.get()
|
||||
self.socket.sendall(buf)
|
||||
finally:
|
||||
q = self.send_q
|
||||
self.send_q = None
|
||||
while q.get():
|
||||
pass
|
||||
|
||||
def send(self, buf):
|
||||
if self.send_q:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user