From 6219c0fee2d87cd1aa89b7dcd5ac049e6d8d7d54 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Tue, 7 Apr 2020 14:21:17 +0200 Subject: [PATCH] Moving test inside timer condition --- tasmota/support_wifi.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasmota/support_wifi.ino b/tasmota/support_wifi.ino index 389a7f8a1..7134ae85b 100644 --- a/tasmota/support_wifi.ino +++ b/tasmota/support_wifi.ino @@ -748,11 +748,11 @@ void wifiKeepAlive(void) { if ((WL_CONNECTED != Wifi.status) || (0 == wifiTimerSec)) { return; } // quick exit if wifi not connected or feature disabled - if (wifiTimerSec > 100) { - wifiTimerSec = (wifiTimerSec - 100) * 60; // convert >100 as minutes, ex: 105 = 5 minutes, 110 = 10 minutes - } if (TimeReached(wifiTimer)) { stationKeepAliveNow(); + if (wifiTimerSec > 100) { + wifiTimerSec = (wifiTimerSec - 100) * 60; // convert >100 as minutes, ex: 105 = 5 minutes, 110 = 10 minutes + } SetNextTimeInterval(wifiTimer, wifiTimerSec * 1000); } }