tttapa.github.io icon indicating copy to clipboard operation
tttapa.github.io copied to clipboard

ESP8266 mDNS example is missing a call to MDNS.update()

Open hvxl opened this issue 3 years ago • 0 comments

Let me start by saying that your document has been very useful to me, especially when I first started out writing code for the ESP8266. Thank you for publishing it.

After developing several projects, I noticed that in one of the projects I have a call to 'MDNS.update()" in loop(), and in an older project I don't. And I remember having mixed results with mDNS.

While looking if the call is necessary, I found your document again. Your mDNS chapter doesn't mention MDNS.update() at all. But checking the ESP8266mDNS sources, I found the following comment:

// Start the MDNS responder by setting the default hostname
// Later call MDNS::update() in every 'loop' to run the process loop

So, it seems to be necessary. You may want to add this to your example.

hvxl avatar Mar 15 '21 16:03 hvxl