diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index 90f14cd..d654cd1 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -212,6 +212,8 @@ public: uint8_t opcode(){ return _opcode; } uint8_t len(){ return _len + 2; } size_t send(AsyncClient *client){ + if (_finished) + return 0; // fix from https://github.com/me-no-dev/ESPAsyncWebServer/pull/1390/files _finished = true; return webSocketSendFrame(client, true, _opcode & 0x0F, _mask, _data, _len); }