You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling WebSocketResponse.close() the server waits for a single message from the client, and if it's not a close message, then it indicates an abnormal closure:
The problem with this is that a non-close client message might be in flight when the server sends its close message, and this results in an abnormal closure at the server's side, even if the client responds to the close message immediately. Here is the situation I'm describing:
To my best understanding this is reported as an abnormal closure on the server side based on the implementation of WebSocketResponse.close().
To Reproduce
I didn't write a reproducer yet.
Expected behavior
During the timeout wait for a close message, and discard messages that arrive before that. Only report an abnormal closure if that close message never arrives.
Logs/tracebacks
NA
Python Version
all
aiohttp Version
master, as of writing 13dc0200d855bdfec1d4c4f3e1c9a1c66f88f1eb
multidict Version
NA
propcache Version
NA
yarl Version
NA
OS
NA
Related component
Server
Additional context
No response
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
Describe the bug
After calling
WebSocketResponse.close()
the server waits for a single message from the client, and if it's not a close message, then it indicates an abnormal closure:aiohttp/aiohttp/web_ws.py
Lines 489 to 506 in 13dc020
The problem with this is that a non-close client message might be in flight when the server sends its close message, and this results in an abnormal closure at the server's side, even if the client responds to the close message immediately. Here is the situation I'm describing:
To my best understanding this is reported as an abnormal closure on the server side based on the implementation of
WebSocketResponse.close()
.To Reproduce
I didn't write a reproducer yet.
Expected behavior
During the timeout wait for a close message, and discard messages that arrive before that. Only report an abnormal closure if that close message never arrives.
Logs/tracebacks
Python Version
all
aiohttp Version
master, as of writing 13dc0200d855bdfec1d4c4f3e1c9a1c66f88f1eb
multidict Version
NA
propcache Version
NA
yarl Version
NA
OS
NA
Related component
Server
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: