Fix some incorrect timeouts when taking semaphores. (#1145)

This commit is contained in:
h2zero authored and GitHub committed 2022-01-24 05:50:14 -06:00
1 parent 5dac1a7035
commit 91ab8dcdf1
1 file changed
+2 -2
+2 -2
View File
@@ -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);
}