diff --git a/library.json b/library.json index 0162e48..cc7b8cd 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Wifi", - "version": "1.0.1", + "version": "1.0.2", "description": "Helper classes for handling wifi connectiviy and OTA", "repository": { diff --git a/src/wifi.h b/src/wifi.h index 1b54e3c..c15e6fe 100644 --- a/src/wifi.h +++ b/src/wifi.h @@ -33,7 +33,7 @@ namespace Wifi { currentPsk = WiFi.psk(); tReconnect.enable(); } - ); + ); void setup(Scheduler& ts, void(*onConnected)() = nullptr) { stationConnectedHandler = WiFi.onStationModeGotIP( @@ -47,7 +47,7 @@ namespace Wifi { stationDisconnectedHandler = WiFi.onStationModeDisconnected( [](const WiFiEventStationModeDisconnected& e) { Serial.println("Disconnected from network."); - tReconnect.restartDelayed(); + tReconnect.enableIfNot(); });