From 9426ae9df6fc3becdaa70e23b879d3a22cdd0a4b Mon Sep 17 00:00:00 2001 From: proddy Date: Tue, 9 Jun 2026 23:00:32 +0200 Subject: [PATCH] fix mDNS restart after a reset --- src/core/network.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/network.cpp b/src/core/network.cpp index 4a65837a3..b732a9d8f 100644 --- a/src/core/network.cpp +++ b/src/core/network.cpp @@ -308,7 +308,11 @@ void Network::checkConnection() { network_ip_ = 0; has_ipv6_ = false; connect_retry_ = 0; - if (network_iface_ == NetIface::ETHERNET) { + // reset the active interface so findNetworks() treats the next link-up (even on the + // same interface) as a new connection and re-runs the setup, including startmDNS() + const NetIface lost_iface = network_iface_; + network_iface_ = NetIface::NONE; + if (lost_iface == NetIface::ETHERNET) { LOG_WARNING("Ethernet connection lost"); return; }