Unbuffered.

This commit is contained in:
retoor 2025-01-31 12:43:38 +01:00
parent 5fd03efc30
commit 780c178d95
2 changed files with 4 additions and 3 deletions

View File

@ -36,5 +36,5 @@ class SocketService(BaseService):
async def delete(self, ws):
try:
self.sockets.remove(ws)
except IndexError:
except :
pass

View File

@ -149,7 +149,8 @@ class RPCView(BaseView):
await rpc(msg.json())
elif msg.type == web.WSMsgType.ERROR:
print(f"WebSocket exception {ws.exception()}")
await self.services.socket.delete(ws)
await self.services.socket.delete(ws)
elif msg.type == web.WSMsgType.CLOSE:
await self.services.socket.delete(ws)
print("WebSocket connection closed")
return ws