improved mutex error handling

- debug message in case of "unexpected" mutex errors
- removed experimental delay() in requestJSONBufferLock
This commit is contained in:
Frank
2025-12-23 00:33:28 +01:00
parent 1c2e6aac6e
commit c185f37791
3 changed files with 9 additions and 2 deletions

View File

@@ -239,7 +239,6 @@ bool requestJSONBufferLock(uint8_t module)
if (jsonBufferLock || !haveLock) {
if (haveLock) esp32SemGive(jsonBufferLockMutex); // we got the mutex, but jsonBufferLock says the opposite -> give up
delay(10); // WLEDMM experimental: small extra wait, in case that esp32 cores temporarily disagree on the value of jsonBufferLock
USER_PRINT(F("ERROR: Locking JSON buffer failed! (still locked by "));
USER_PRINT(jsonBufferLock);
USER_PRINTLN(")");