[BT] Fix scan continue even disconnected from network (#1829)

and cause an undesired restart
This commit is contained in:
Florian authored and GitHub committed 2023-12-07 16:59:06 -06:00
1 parent 8c8dc6b6f6
commit 6a4b38a0cb
1 file changed
+2 -2
+2 -2
View File
@@ -786,8 +786,8 @@ void coreTask(void* pvParameters) {
n++;
delay(1000);
}
if (client.state() != 0) {
Log.warning(F("MQTT client disconnected no BLE scan" CR));
if (!connected) {
Log.warning(F("MQTT client or Network disconnected no BLE scan" CR));
} else if (!BTProcessLock) {
if (xSemaphoreTake(semaphoreBLEOperation, pdMS_TO_TICKS(30000)) == pdTRUE) {
BLEscan();