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 commit83e3709a0d. - controller: fix send_q draining83e3709a0dSigned-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:
committed by
FUJITA Tomonori
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:
|
||||
|
||||
Reference in New Issue
Block a user