From 5e5e6ff0538491dbe865002ef31f44c3f4fa9018 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 21 Feb 2024 16:02:04 +0100 Subject: [PATCH] fixed ip for ETH, setting order --- lib/framework/NetworkSettingsService.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/framework/NetworkSettingsService.cpp b/lib/framework/NetworkSettingsService.cpp index 2b986a0d8..90b25d396 100644 --- a/lib/framework/NetworkSettingsService.cpp +++ b/lib/framework/NetworkSettingsService.cpp @@ -316,12 +316,11 @@ void NetworkSettingsService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) break; case ARDUINO_EVENT_ETH_START: - ETH.setHostname(emsesp::EMSESP::system_.hostname().c_str()); - // configure for static IP if (_state.staticIPConfig) { ETH.config(_state.localIP, _state.gatewayIP, _state.subnetMask, _state.dnsIP1, _state.dnsIP2); } + ETH.setHostname(emsesp::EMSESP::system_.hostname().c_str()); break; case ARDUINO_EVENT_ETH_GOT_IP: