Fixed logging.
This commit is contained in:
parent
b029eb8d17
commit
11d47c3ebe
@ -110,9 +110,11 @@ class RPC:
|
|||||||
logger.exception("Error while receiving:", ex)
|
logger.exception("Error while receiving:", ex)
|
||||||
break
|
break
|
||||||
if msg.type == aiohttp.WSMsgType.CLOSED:
|
if msg.type == aiohttp.WSMsgType.CLOSED:
|
||||||
raise Exception("WebSocket closed.")
|
logger.exception("WebSocket closed.")
|
||||||
|
break
|
||||||
elif msg.type == aiohttp.WSMsgType.ERROR:
|
elif msg.type == aiohttp.WSMsgType.ERROR:
|
||||||
raise Exception("WebSocket error:", msg)
|
logger.exception("WebSocket error.")
|
||||||
|
break
|
||||||
elif msg.type == aiohttp.WSMsgType.TEXT:
|
elif msg.type == aiohttp.WSMsgType.TEXT:
|
||||||
|
|
||||||
if self.current_call_id and not msg.json().get('callId') != self.current_call_id:
|
if self.current_call_id and not msg.json().get('callId') != self.current_call_id:
|
||||||
@ -126,5 +128,6 @@ class RPC:
|
|||||||
logger.exception(ex)
|
logger.exception(ex)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise Exception("Unexpected message type.")
|
logger.exception("Unexpected message type.")
|
||||||
|
break
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user