websocket connection is closing after some time unexpectedly
fti-ravhad opened this issue ยท 8 comments
I am using webrtc to live stream media , after some time ice-candidates sending and receiving the connection is closed with below exceptions.
The connection works for keepalive_timeout time only, after that it closes . What are the reasons behind this exceptions
Python version : 3.10.12
websockets version : 12
I have the exact same issue as this.
What is the solution?
https://websockets.readthedocs.io/en/stable/project/contributing.html#cryptocurrency-users
im not crypto user nor crypto developer ๐ญ I use ws to communicate with robots
Thanks! This is pretty much what I have. I called it the temporary bandaid but turn out this is the official solution. Deeply thank you for your time!
Oops, sorry โ that answer was meant for another issue, namely #1447 โ my mistake ๐
That's ok!
You can close this since your doc has the answer already. This answered the main of this issue as well
The stack trace shows that the other side in closing the websocket connection normally. That's what received 1000 (OK); then sent 1000 (OK)
means. 1000 is the normal close code.
I'm glad you could figure it out with the FAQ anyway!
just add asyncio.TimeoutError .. instead of TimeoutError . This worked for me..