Fix #10 : ConcetionClosedError
release-tag / release-image (push) Successful in 19s

This commit is contained in:
2024-05-12 11:10:04 +02:00
parent 5260b6eba8
commit 1a02793873
+4 -2
View File
@@ -4,7 +4,7 @@ from typing import Callable, Any, TYPE_CHECKING, Union
from pydantic import ValidationError
from websockets.server import WebSocketServerProtocol
from websockets.exceptions import ConnectionClosedOK
from websockets.exceptions import ConnectionClosedOK, ConnectionClosedError
from netcode.models import Message, LoginMessage, MessageType
@@ -71,9 +71,11 @@ class LobbyClientController:
data="login",
)
)
try:
async for message in self.websocket:
await self.on_message(message)
except ConnectionClosedError:
print("Connection Closed Error")
async def close(self):
"""Remove self from Lobby broadcasting list"""