#102: only reconnect wifi every 40s
This commit is contained in:
parent
a129d865c9
commit
2ab6a00883
|
@ -85,6 +85,7 @@ bool GwWifi::connectInternal(){
|
|||
if (wifiClient->asBoolean()){
|
||||
clientIsConnected=false;
|
||||
LOG_DEBUG(GwLog::LOG,"creating wifiClient ssid=%s",wifiSSID->asString().c_str());
|
||||
WiFi.setAutoReconnect(false); //#102
|
||||
wl_status_t rt=WiFi.begin(wifiSSID->asCString(),wifiPass->asCString());
|
||||
LOG_DEBUG(GwLog::LOG,"wifiClient connect returns %d",(int)rt);
|
||||
lastConnectStart=millis();
|
||||
|
@ -92,7 +93,8 @@ bool GwWifi::connectInternal(){
|
|||
}
|
||||
return false;
|
||||
}
|
||||
#define RETRY_MILLIS 20000
|
||||
//#102: we should have a wifi connect retry being > 30s - with some headroom
|
||||
#define RETRY_MILLIS 40000
|
||||
void GwWifi::loop(){
|
||||
if (wifiClient->asBoolean())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue