[BT] Fix scan continue even disconnected from network (#1829)
and cause an undesired restart
This commit is contained in:
1 parent
8c8dc6b6f6
commit
6a4b38a0cb
1 file changed
+2
-2
+2
-2
@@ -786,8 +786,8 @@ void coreTask(void* pvParameters) {
|
|||||||
n++;
|
n++;
|
||||||
delay(1000);
|
delay(1000);
|
||||||
}
|
}
|
||||||
if (client.state() != 0) {
|
if (!connected) {
|
||||||
Log.warning(F("MQTT client disconnected no BLE scan" CR));
|
Log.warning(F("MQTT client or Network disconnected no BLE scan" CR));
|
||||||
} else if (!BTProcessLock) {
|
} else if (!BTProcessLock) {
|
||||||
if (xSemaphoreTake(semaphoreBLEOperation, pdMS_TO_TICKS(30000)) == pdTRUE) {
|
if (xSemaphoreTake(semaphoreBLEOperation, pdMS_TO_TICKS(30000)) == pdTRUE) {
|
||||||
BLEscan();
|
BLEscan();
|
||||||
|
|||||||
Reference in new issue
Block a user