util: Print locking module when JSON lock fails

For debugging, also log who was trying to lock when it was contended.
pull/4089/head
Will Miles 2024-08-04 14:02:05 -04:00
rodzic 6f01896d04
commit e701b5b5eb
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -231,7 +231,9 @@ bool requestJSONBufferLock(uint8_t module)
#endif
// If the lock is still held - by us, or by another task
if (jsonBufferLock) {
DEBUG_PRINT(F("ERROR: Locking JSON buffer failed! (still locked by "));
DEBUG_PRINT(F("ERROR: Locking JSON buffer ("));
DEBUG_PRINT(module);
DEBUG_PRINT(F(") failed! (still locked by "));
DEBUG_PRINT(jsonBufferLock);
DEBUG_PRINTLN(")");
#ifdef ARDUINO_ARCH_ESP32