mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-13 19:36:26 +03:00
fix mDNS restart after a reset
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user