Skip to content

Commit 16f44b1

Browse files
committed
Remove MDNS start detection
That wasn't the problem
1 parent fe0853a commit 16f44b1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
//----------------------------------------
3535

3636
int wifiConnectionAttempts; // Count the number of connection attempts between restarts
37-
bool mdnsIsRunning = false; // Ending mdns when it was not yet started causes it to fail to start
3837

3938
#ifdef COMPILE_WIFI
4039

@@ -432,11 +431,8 @@ void wifiStop()
432431
stopWebServer();
433432

434433
// Stop the multicast domain name server
435-
if (mdnsIsRunning == true && settings.mdnsEnable == true)
436-
{
434+
if (settings.mdnsEnable == true)
437435
MDNS.end();
438-
mdnsIsRunning = false;
439-
}
440436

441437
// Stop the DNS server if we were using the captive portal
442438
if (WiFi.getMode() == WIFI_AP && settings.enableCaptivePortal)
@@ -554,10 +550,7 @@ bool wifiConnect(unsigned long timeout)
554550
if (MDNS.begin("rtk") == false) // This should make the device findable from 'rtk.local' in a browser
555551
systemPrintln("Error setting up MDNS responder!");
556552
else
557-
{
558553
MDNS.addService("http", "tcp", settings.httpPort); // Add service to MDNS
559-
mdnsIsRunning = true;
560-
}
561554
}
562555
}
563556

0 commit comments

Comments
 (0)