From 5622fb818372e72daae466ccf71f918e38f3fa1d Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Sat, 7 Sep 2019 12:45:52 +0300 Subject: [PATCH] wifi: try garp before checking AP, if it is destroyed --- code/espurna/wifi.ino | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/espurna/wifi.ino b/code/espurna/wifi.ino index bc9dc3a0..355ce554 100644 --- a/code/espurna/wifi.ino +++ b/code/espurna/wifi.ino @@ -777,6 +777,13 @@ void wifiLoop() { _wifi_scan_client_id = 0; } + // Only send out gra arp when in STA mode + #if WIFI_GRATUITOUS_ARP_SUPPORT + if (_wifi_gratuitous_arp_interval) { + _wifiSendGratuitousArp(_wifi_gratuitous_arp_interval); + } + #endif + // Check if we should disable AP static unsigned long last = 0; if (millis() - last > 60000) { @@ -784,11 +791,4 @@ void wifiLoop() { _wifiCheckAP(); } - #if WIFI_GRATUITOUS_ARP_SUPPORT - // Only send out gra arp when in STA mode - if (_wifi_gratuitous_arp_interval) { - _wifiSendGratuitousArp(_wifi_gratuitous_arp_interval); - } - #endif - }