requestJSONBufferLock() variable timeout

* default timeout = 1800ms
* reduced timeout for ws (300ms)
This commit is contained in:
Frank
2025-12-30 01:57:46 +01:00
parent 5739a54287
commit 80b906999b
3 changed files with 6 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
}
bool verboseResponse = false;
if (!requestJSONBufferLock(11)) {
if (!requestJSONBufferLock(11, 300)) {
client->text(F("{\"error\":3}")); // ERR_NOBUF
return;
}
@@ -138,7 +138,7 @@ void sendDataWs(AsyncWebSocketClient * client)
DEBUG_PRINTF("sendDataWs\n");
if (!ws.count()) return;
if (!requestJSONBufferLock(12)) {
if (!requestJSONBufferLock(12, 300)) {
if (client) {
client->text(F("{\"error\":3}")); // ERR_NOBUF
} else {