diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-06-12 16:43:06 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-06-12 16:34:30 +0000 |
commit | c83311ddff9bce2a0e00cd6547c9680192cc3d8c (patch) | |
tree | da02e04244dfc12c6cb9c606a8ea97c75a98ae56 /src/vpp-api | |
parent | 7a99823c0b6db74b6b845c35bc1ac09f37a4374d (diff) |
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>
Diffstat (limited to 'src/vpp-api')
-rw-r--r-- | src/vpp-api/python/vpp_papi/vpp_transport_socket.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py index 6e228e46e11..d26a3d47bf3 100644 --- a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py +++ b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py @@ -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. |