From a904da2a2e9e0a10a912c9729ab2efa1f8cd2f85 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Mon, 10 Feb 2020 16:57:42 -0300 Subject: [PATCH] Fix Deep-Sleep-Wake timming https://github.com/arendst/Tasmota/issues/7621 --- tasmota/support_wifi.ino | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasmota/support_wifi.ino b/tasmota/support_wifi.ino index 2a3951147..d53b14f71 100644 --- a/tasmota/support_wifi.ino +++ b/tasmota/support_wifi.ino @@ -189,7 +189,13 @@ void WifiBegin(uint8_t flag, uint8_t channel) if (!WiFi.getAutoConnect()) { WiFi.setAutoConnect(true); } // Handle the reconnection in WifiCheckIp() since the autoreconnect keeps sending deauthentication messages which causes the AP to block traffic as it looks like an DoS attack // This needs to be explicitly called as "false" otherwise the default is enabled - WiFi.setAutoReconnect(false); +#ifdef USE_DEEPSLEEP + if (!(DeepSleepEnabled())) { // #7621 +#endif + WiFi.setAutoReconnect(false); +#ifdef USE_DEEPSLEEP + } +#endif switch (flag) { case 0: // AP1 case 1: // AP2