How do you close We socket client on WIFI disconnection??
If the Client WIFI is disconnected before browser is closed.
Sometimes I get Message "[AsyncTCP.cpp] _poll(): ack timeout 4" and the websocket can close correctly.
However sometime nothing happened and the Heap would fill up and "Error Too many message queued"
What can I do here?
I tried the following code:
void WiFiStationDisconnected(WiFiEvent_t event, WiFiEventInfo_t info) { websocket.closeAll(); Serial.println(websocket.count()); }
websocket.closeAll(); doesnt work; ws.count(); Still shows there are connection websocket.close(); doesnt work; ws.count(); Still shows there are connection server.reset(); Crash ESP32;
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.