-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should not throw exception for EofStream Exception in WebSocket. #3223
Comments
Looks working as expected. |
@webknjaz |
Hello, seems related to this ticket: Unhandled exception
Traceback (most recent call last):
File "/tmp/tmpg2n5yr0j/pypi__aiohttp_3_4_4/aiohttp/web_protocol.py", line 410, in start
await resp.prepare(request)
AttributeError: 'NoneType' object has no attribute 'prepare' I get this exception on every reconnect attempt on a closed (closing?) connection |
It's not. |
Long story short
Exception will be thrown when try to read from Websocket stream, if the socket stream has been closed.
Expected behaviour
No exception should be thrown, instead a message with type
aiohttp.WSMsgType.closed
should be returnActual behaviour
Exception is thrown.
Steps to reproduce
Run the program below, while ws is the WebSocket instance. While the socket is closed by the remote server, the async for loop will throw exception.
Exception log is below:
Your environment
MacOS
Python 3.6.5 :: Anaconda custom (64-bit)
aiohttp==3.3.2
The text was updated successfully, but these errors were encountered: