Replace buffer lock magic numbers with defines (#5217)
* replace magic numbers with defines
This commit is contained in:
@@ -42,7 +42,7 @@ void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventTyp
|
||||
}
|
||||
|
||||
bool verboseResponse = false;
|
||||
if (!requestJSONBufferLock(11)) {
|
||||
if (!requestJSONBufferLock(JSON_LOCK_WS_RECEIVE)) {
|
||||
client->text(F("{\"error\":3}")); // ERR_NOBUF
|
||||
return;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ void sendDataWs(AsyncWebSocketClient * client)
|
||||
{
|
||||
if (!ws.count()) return;
|
||||
|
||||
if (!requestJSONBufferLock(12)) {
|
||||
if (!requestJSONBufferLock(JSON_LOCK_WS_SEND)) {
|
||||
const char* error = PSTR("{\"error\":3}");
|
||||
if (client) {
|
||||
client->text(FPSTR(error)); // ERR_NOBUF
|
||||
|
||||
Reference in New Issue
Block a user