papi: make socket disconnect more robust
Previusly, read error could happen before message_thread starts, so do not attempt to join in that case. Change-Id: Ie119916831e320e38eb02e48515b4c6a9cb937e5 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
This commit is contained in:
@ -149,7 +149,7 @@ class VppTransport(object):
|
||||
self.socket.close()
|
||||
if self.sque is not None:
|
||||
self.sque.put(True) # Terminate listening thread
|
||||
if self.message_thread is not None:
|
||||
if self.message_thread is not None and self.message_thread.is_alive():
|
||||
# Allow additional connect() calls.
|
||||
self.message_thread.join()
|
||||
# Collect garbage.
|
||||
|
Reference in New Issue
Block a user