Add a guard to break if no connection
If the WebSocket connection is already disconnected we don't have to
wait for messages
Change-Id: I7543c8e61711f036140db20416a57447da6c4c18
Closes-Bug: #1793264
(cherry picked from commit 99b7a3d1d1
)
This commit is contained in:
parent
5b00837494
commit
d476a6ca71
|
@ -138,6 +138,9 @@ class WebsocketClient(object):
|
|||
messages.
|
||||
"""
|
||||
|
||||
if not self._ws.connected:
|
||||
return
|
||||
|
||||
if timeout is None:
|
||||
LOG.warning("Waiting for messages on queue '{}' with no timeout."
|
||||
.format(self._queue_name))
|
||||
|
|
Loading…
Reference in New Issue