Fix WebSocket close reason truncation

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-12-06 14:43:09 -03:00
commit ab89001a44

View file

@ -217,7 +217,7 @@ class ChatService(Service):
await self.close_connection(
client_id=client_id,
code=status.WS_1011_INTERNAL_ERROR,
reason=str(exc)[:120],
reason=str(exc),
)
elif websocket.client_state == WebSocketState.DISCONNECTED:
self.disconnect(client_id)