Replies: 1 comment
-
First step is to enable debug logging and look at the output. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using WebSockets server on ESP8266 from this library. Classical schema, nothing overcomplicated: client is written on JavaScript, running on browser, used to control ESP8266 device. I am using WSServer.broadcastTXT() to send json messages back to clients to update their web-page. Everything working very good for days, until problem happened.
Problem: If client is gone (for example, client cell phone has lost wifi) - web socket server takes very long time, around 20 minutes (!), to disconnect missing client. I see the call of WSServer.broadcastTXT() takes more than WEBSOCKETS_TCP_TIMEOUT mS, which is clearly understandable, but how to make the disconnection to trigger faster that that? Using WSServer.enableHeartbeat() with tight timing, like WSServer.enableHeartbeat(30000, 100, 3), does not change anything, except adding extra network traffic for ping-pong messages. If client just close page in browser - client closes correctly.
Are there any solution on how to enforce web socket server to disconnect missing client much earlier than 20 minutes? What is the logic of disconnection of client(s) on server side?
Beta Was this translation helpful? Give feedback.
All reactions