Catch websocket connection close errors in cleanup
This can add useless noise when we have timeouts in particular. Change-Id: I55d18885f06e530ff9a5492c0b98f37525e88ed6 Closes-Bug: #1805647
This commit is contained in:
@@ -167,7 +167,10 @@ class WebsocketClient(object):
|
|||||||
|
|
||||||
def __exit__(self, *exc):
|
def __exit__(self, *exc):
|
||||||
"""Call cleanup when exiting the context manager"""
|
"""Call cleanup when exiting the context manager"""
|
||||||
self.cleanup()
|
try:
|
||||||
|
self.cleanup()
|
||||||
|
except websocket.WebSocketConnectionClosedException:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ClientWrapper(object):
|
class ClientWrapper(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user