TypeError while disconnecting socket connections
See original GitHub issueUvicorn sometimes throws this error when client tries to disconnect. This doesn’t seem to happen when daphne is used.
Task exception was never retrieved
future: <Task finished coro=<websocket_session() done, defined at /home/chillar/.virtualenvs/mesh/lib/python3.6/site-packages/uvicorn/protocols/websocket.py:31> exception=TypeError("'<=' not supported between instances of 'int' and 'NoneType'",)>
Traceback (most recent call last):
File "/home/chillar/.virtualenvs/mesh/lib/python3.6/site-packages/uvicorn/protocols/websocket.py", line 40, in websocket_session
data = await protocol.recv()
File "/home/chillar/.virtualenvs/avilpage.com/lib/python3.6/site-packages/websockets/protocol.py", line 323, in recv
raise ConnectionClosed(self.close_code, self.close_reason)
File "/home/chillar/.virtualenvs/avilpage.com/lib/python3.6/site-packages/websockets/exceptions.py", line 147, in __init__
if 3000 <= code < 4000:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Socket.io - TypeError: socket.in is not a function
socket.in or socket.to not working in client and you should use it in server side. Socket.io Documentation. for example : io.on('connection' ...
Read more >Type error on error closing connection · Issue #1591
This can only happen if the 'error' event is emitted after the 'close' event on the net.Socket but it would be a bug...
Read more >Server Initialization
Once you have installed the Socket.IO server library, you can now init the server. The complete list of options can be found below....
Read more >Socket.io - User establishes two connections and not sure ...
But then I get the following error: Uncaught TypeError: Error resolving module specifier “socket.io-client”. Relative module specifiers must start with “./”, “…
Read more >Errors | Node.js v19.3.0 Documentation
ECONNRESET (Connection reset by peer): A connection was forcibly closed by a peer. This normally results from a loss of the connection on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
An update on this, a new version of
websockets
has just been released that should include the fix for the issue I linked - though I have not been able to confirm if that was also the cause of the original issue here.@ChillarAnand could you try testing against the new version of
websockets
(5.0)?Daphne uses
autobahn.twisted.websocket
.