-
-
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
Can't detect disconnection on wifi websocket client #2368
Comments
this seems like a bug. |
Probably by sending a message from WebSocketResponse._pong_not_received (after test) to WebSocketResponse.receive loop. I don't know to do how to do. |
I do not know if it's a good solution, but here is the code that allows me to detect the disconnection of all esp8266. :
|
Have you tried like in close method Line 132 in 5de1c0b
I have the same thing — the pong callback doesn't stop reading loop :( |
BTW it happens not in a wifi network |
Had same problem on wired network, adding |
Long story short
I use several esp8266 (a wifi IOT) as websocket client with aiohttp 2.3.1 websocket server .
Works perfectly but i can't detect disconnection.
Expected behaviour
I want to detect disconnection when an esp8266 disappear.
Actual behaviour
I detect connections and play with all clients ESP8266. The method WebSocketResponse::_pong_not_received detecst all disconnections at heartbeat delay but do nothing.
I there any solution?
Steps to reproduce
A background loop to send a ping to all client esp8266.
WebSocketResponse instance with heartbeat param set.
Your environment
Debian machine + Python 3.5 + aiohttp v 2.3.1
The text was updated successfully, but these errors were encountered: