Unlock websocket client before closing on ACK

Fraction of commit f7c5c452df5b0918357fc98003aafde9e18304f9 of dumbfixes
branch of 0xFEEDC0DE64 fork of ESPAsyncWebServer.

Split off for clarity.
This commit is contained in:
Alex Villacís Lasso
2021-01-02 17:54:39 -05:00
parent 9509bdcd66
commit 1e8d96631d

View File

@@ -495,6 +495,7 @@ void AsyncWebSocketClient::_onAck(size_t len, uint32_t time){
if(_status == WS_DISCONNECTING && head.opcode() == WS_DISCONNECT){ if(_status == WS_DISCONNECTING && head.opcode() == WS_DISCONNECT){
_controlQueue.pop_front(); _controlQueue.pop_front();
_status = WS_DISCONNECTED; _status = WS_DISCONNECTED;
l.unlock();
_client->close(true); _client->close(true);
return; return;
} }