From 95cc328b5cfc43695828e9cabe10e288ca6633f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 18 Nov 2022 19:37:56 +0100 Subject: [PATCH] That wifi update didn't go down well. --- src/mesh/http/WiFiAPClient.cpp | 9 --------- src/mesh/http/WiFiAPClient.h | 2 -- src/mqtt/MQTT.cpp | 5 ----- 3 files changed, 16 deletions(-) diff --git a/src/mesh/http/WiFiAPClient.cpp b/src/mesh/http/WiFiAPClient.cpp index d5a8fb3e9..c00738d1a 100644 --- a/src/mesh/http/WiFiAPClient.cpp +++ b/src/mesh/http/WiFiAPClient.cpp @@ -41,12 +41,6 @@ static bool needReconnect = true; // If we create our reconnector, run it once a static Periodic *wifiReconnect; -void triggerReconnect() -{ - needReconnect = true; - wifiReconnect->setIntervalFromNow(1000); -} - static int32_t reconnectWiFi() { const char *wifiName = config.network.wifi_ssid; @@ -82,9 +76,6 @@ static int32_t reconnectWiFi() } else { DEBUG_MSG("NTP Update failed\n"); - WiFi.disconnect(false, true); - needReconnect = true; - return 1000; } } #endif diff --git a/src/mesh/http/WiFiAPClient.h b/src/mesh/http/WiFiAPClient.h index f45eb0c5d..9729c24b5 100644 --- a/src/mesh/http/WiFiAPClient.h +++ b/src/mesh/http/WiFiAPClient.h @@ -13,8 +13,6 @@ bool initWifi(); void deinitWifi(); -void triggerReconnect(); - bool isWifiAvailable(); uint8_t getWifiDisconnectReason(); diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index a1c31c26b..244cf1458 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -1,5 +1,4 @@ #include "MQTT.h" -#include "mesh/http/WiFiAPClient.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" @@ -165,10 +164,6 @@ void MQTT::reconnect() sendSubscriptions(); } else DEBUG_MSG("Failed to contact MQTT server...\n"); -#if HAS_WIFI && !defined(ARCH_PORTDUINO) - WiFi.disconnect(false, true); - triggerReconnect(); -#endif } }