Closed ChaitanyaYeole02 closed 1 year ago
@villekr I have tried using try, except still I get this error, this is something related to the future or coroutine in handler.This is just my guess
try:
event = await receive()
except Exception as e:
event['type'] = ASGIWebSocketEvent.disconnect
event['code'] = 1006
I tried this, then I get a handshake error
ERROR: opening handshake failed
Traceback (most recent call last):
File "C:\Users\s******5\PycharmProjects\websocket\venv\lib\site-packages\websockets\legacy\server.py", line 163, in handler
await self.handshake(
File "C:\Users\s******5\PycharmProjects\websocket\venv\lib\site-packages\websockets\legacy\server.py", line 597, in handshake
raise self.connection_closed_exc() # pragma: no cover
websockets.exceptions.ConnectionClosedError: no close frame received or sent
@villekr What I can figure out from this is that, when my connection is abrupted due to anything, I will get this handshake error
I'm unable to reproduce this error (under Python 3.10.2). You may refer to updated example code in https://github.com/villekr/ocpp-asgi/tree/issue/15, which runs 10 workers and 20 charging stations.
I received this error while I am running 10 workers and connecting 18chargers at once and disconnecting all at once.
I received this error during events = await receive() inside handler