report out-of-memory situations to the user

This commit is contained in:
Frank
2024-04-16 19:10:46 +02:00
parent b27686bd2b
commit 019cafc5e0
6 changed files with 42 additions and 11 deletions

View File

@@ -162,6 +162,7 @@ void sendDataWs(AsyncWebSocketClient * client)
ws.closeAll(1013); //code 1013 = temporary overload, try again later
ws.cleanupClients(0); //disconnect all clients to release memory
ws._cleanBuffers();
errorFlag = ERR_LOW_WS_MEM;
return; //out of memory
}