From 91ab8dcdf1ff2866f002e9d72e920a603f87cbc2 Mon Sep 17 00:00:00 2001 From: h2zero <32826625+h2zero@users.noreply.github.com> Date: Mon, 24 Jan 2022 04:50:14 -0700 Subject: [PATCH] Fix some incorrect timeouts when taking semaphores. (#1145) --- main/ZgatewayBT.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index 23408f8..0bf850b 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -795,7 +795,7 @@ void launchBTDiscovery() { if (newDevices == 0) return; # ifdef ESP32 - if (xSemaphoreTake(semaphoreCreateOrUpdateDevice, pdMS_TO_TICKS(1000) == pdFALSE)) { + if (xSemaphoreTake(semaphoreCreateOrUpdateDevice, pdMS_TO_TICKS(1000)) == pdFALSE) { Log.error(F("Semaphore NOT taken" CR)); return; } @@ -1045,7 +1045,7 @@ void MQTTtoBT(char* topicOri, JsonObject& BTdata) { // json object decoding if (WorBupdated) { # ifdef ESP32 - if (xSemaphoreTake(semaphoreCreateOrUpdateDevice, pdMS_TO_TICKS(1000) == pdTRUE)) { + if (xSemaphoreTake(semaphoreCreateOrUpdateDevice, pdMS_TO_TICKS(1000)) == pdTRUE) { dumpDevices(); xSemaphoreGive(semaphoreCreateOrUpdateDevice); }