-
-
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
EofStream and autoclose #2784
Comments
Is it aiohttp 3.0? |
"version": "==3.0.6" It's my pipfile.lock's content |
This is a bug, iteration over websocket messages should be stopped without returning stop marker to user. |
yeah, i should take time to read contribute guide |
Fixed by #2814, released by aiohttp 3.1 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
aiohttp 3.8.1
async def __anext__(self) -> WSMessage:
msg = await self.receive()
if msg.type in (WSMsgType.CLOSE, WSMsgType.CLOSING, WSMsgType.CLOSED):
raise StopAsyncIteration
return msg Yes, bug is fixed in iterator but NOT fixed for I would raise RuntimeError or so if corresponding message "type" (like bytes, str, or json) can not be received. |
see #6800 |
Long story short
Hi, I meet a problem with websocket's client message, sometimes I will receive EofStream object instead of bytes or str(so broken my program).I don't now what's this object.But I guess it means EOF right?
Expected behaviour
If EofStream meaning EOF, Why not just close this websocket connection, beacuase I see
ws_connect()
have a argument named 'autoclose', it default toTrue
?Or EofStream has other meaning?
The text was updated successfully, but these errors were encountered: