File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -352,11 +352,15 @@ void WiFiEvent(WiFiEvent_t event)
352352 DEBUG_PRINTLN (F (" ETH Started" ));
353353 break ;
354354 case SYSTEM_EVENT_ETH_GOT_IP:
355- DEBUG_PRINTLN (F (" ETH Got IP" ));
356- // Disconnect WiFi here in event context (original behavior that worked)
357- if (!apActive && WiFi.status () == WL_CONNECTED) {
358- DEBUG_PRINTLN (F (" Disabling WiFi from event handler" ));
359- WiFi.disconnect (true );
355+ if (Network.isEthernet ()) {
356+ if (!apActive) {
357+ DEBUG_PRINTLN (F (" WiFi Connected *and* ETH Connected. Disabling WIFi" ));
358+ WiFi.disconnect (true );
359+ } else {
360+ DEBUG_PRINTLN (F (" WiFi Connected *and* ETH Connected. Leaving AP WiFi active" ));
361+ }
362+ } else {
363+ DEBUG_PRINTLN (F (" WiFi Connected. No ETH" ));
360364 }
361365 forceReconnect = true ;
362366 break ;
You can’t perform that action at this time.
0 commit comments