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
I can consistently replicate the bug of the code getting "stuck" at websocket.sendTXT(...) if I sever the connection from the server side manually. It seems my users are having this problem. I already tried guardrails like:
...
if (!hasConnectedToWebSocket || !webSocket.isConnected()) {
Serial.println("WebSocket not connected. Discarding data.");
return;
}
webSocket.sendTXT(data); // gets stuck here
...
Any idea on how to make this more robust / fail more gracefully?
Context:
My device is recording and sending chunks to the server as we record. The connection breaking during this process seems inevitable at some point or another (without me manually doing it to replicate the bug).