Skip to content

Commit 0ed8bb2

Browse files
committed
compile fix for esp8266 and esp32
1 parent b0c7cb9 commit 0ed8bb2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: src/WiFiConnectionHandler.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnecting()
135135
if (WiFi.status() != WL_CONNECTED){
136136
return NetworkConnectionState::INIT;
137137
}
138-
138+
#if !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
139139
int ping_result = WiFi.ping("time.arduino.cc");
140140
Debug.print(DBG_INFO, F("WiFi.ping(): %d"), ping_result);
141141
if (ping_result < 0)
@@ -144,11 +144,10 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnecting()
144144
Debug.print(DBG_INFO, F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast<unsigned int>(NetworkConnectionState::CONNECTING)]);
145145
return NetworkConnectionState::CONNECTING;
146146
}
147-
else
148-
{
149-
Debug.print(DBG_INFO, F("Connected to Internet"));
150-
return NetworkConnectionState::CONNECTED;
151-
}
147+
#endif
148+
Debug.print(DBG_INFO, F("Connected to Internet"));
149+
return NetworkConnectionState::CONNECTED;
150+
152151
}
153152

154153
NetworkConnectionState WiFiConnectionHandler::update_handleConnected()

0 commit comments

Comments
 (0)