forked from me-no-dev/ESPAsyncWebServer
Prevent an assertion failure when using WebSockets (#584)
Frequently when using Web Sockets you will get the assert failure: assertion "new_rcv_ann_wnd <= 0xffff" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/lwip/src/core/tcp.c", line 779, function: tcp_update_rcv_ann_wnd This will happen particulary when you close the browser window. This change prevents the issue from occuring.
This commit is contained in:
@@ -680,6 +680,7 @@ void AsyncWebSocketClient::_onData(void *pbuf, size_t plen){
|
|||||||
_client->close(true);
|
_client->close(true);
|
||||||
} else {
|
} else {
|
||||||
_status = WS_DISCONNECTING;
|
_status = WS_DISCONNECTING;
|
||||||
|
_client->ackLater();
|
||||||
_queueControl(new AsyncWebSocketControl(WS_DISCONNECT, data, datalen));
|
_queueControl(new AsyncWebSocketControl(WS_DISCONNECT, data, datalen));
|
||||||
}
|
}
|
||||||
} else if(_pinfo.opcode == WS_PING){
|
} else if(_pinfo.opcode == WS_PING){
|
||||||
|
Reference in New Issue
Block a user