peterhinch / micropython-mqtt

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.
MIT License
549 stars 116 forks source link

Update mqtt_as.py - move DNS ip to config #106

Closed AdrianFretwell closed 1 year ago

AdrianFretwell commented 1 year ago

A very simple change to change the "wan_ok" DNS check IP address to become a config item. I had the need to change the default 8.8.8.8 to a local DNS server address for a LAN with no internet connection.

peterhinch commented 1 year ago

The wan_ok method is purely a convenience, and the rest of the code does not use it. If you have other requirements ignore it and perform your own check. On a LAN with a local broker I have never found a need for this functionality.

AdrianFretwell commented 1 year ago

I quite understand, my situation is not very common having a large LAN distributed over several kilometres with nearly 50 fibre links. Many thanks for considering the PR.