diff --git a/src/snekbot/rpc.py b/src/snekbot/rpc.py index f98cdac..a1f95b7 100644 --- a/src/snekbot/rpc.py +++ b/src/snekbot/rpc.py @@ -116,10 +116,9 @@ class RPC: print("Error while receiving:", ex) break if msg.type == aiohttp.WSMsgType.CLOSED: - break + raise Exception("WebSocket closed.") elif msg.type == aiohttp.WSMsgType.ERROR: - print("WebSocket error:", msg) - break + raise Exception("WebSocket error:", msg) elif msg.type == aiohttp.WSMsgType.TEXT: if self.current_call_id and not msg.json().get('callId') != self.current_call_id: @@ -134,5 +133,4 @@ class RPC: break else: raise Exception("Unexpected message type.") - print("huh") return None