-
Notifications
You must be signed in to change notification settings - Fork 555
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
ESP32/WebSocketClient seems to block for a long time in case of unstable and very slow network connections #911
Comments
all TCP writes in the lib go via this function: arduinoWebSockets/src/WebSockets.cpp Lines 664 to 712 in 7a4c416
the but the "blocking" you describe is most likely on the lower layers (TCP stack of the ESP the TCP stack is informed about the timeout we want via this code here: arduinoWebSockets/src/WebSocketsClient.cpp Line 316 in 7a4c416
but if that works in all cases is up to the TCP stack. enabling the debug output will give you more information on where the code is stuck and waiting. |
I'm using the WebSocketClient with an ESP32. I know that I have a fairly slow and sometimes unstable WiFi connectivity.
Currently it seems that the
sendBIN()
methods are blocking for a very long time, and is not giving up. Is there a way to indicate a kind of send-timeout for such invocations? I really would like to give up in case of 1000 bytes or so cannot be transferred in under one second.I know that there is the
WEBSOCKETS_TCP_TIMEOUT
in 'WebSockets.h', but I don't know if this is the place to configure the send-timeout in case of very slow and unstable connections.The text was updated successfully, but these errors were encountered: