Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[timeouts] Improve response when hosts are not reachable #939

Conversation

TD-er
Copy link
Member

@TD-er TD-er commented Feb 25, 2018

See #922 and #847

Problem with DNS resolve is that it is quite slow when resulting in a failure and it tends to keep the ESP occupied and make it unresponsive.

Changed the way it is connecting to a controller.
Checks to see if a host is online is now primarily done using IP. Controllers use DNS when needed (e.g. for HTTP)
The IP-address is being cached when using DNS and this is being refreshed as soon as a connection fails using the IP.

N.B. some routers may implement a non-standard DNS resolver which always resolves to a standard address when DNS name cannot be resolved. This will not be fixed and will always remain an issue.

See letscontrolit#922 and letscontrolit#847

Problem with DNS resolve is that it is quite slow when resulting in a failure and it tends to keep the ESP occupied and make it unresponsive.

Changed the way it is connecting to a controller.
Not sure if http requests are still OK, maybe we should make an exception for those when selected to use DNS.
@psy0rz psy0rz merged commit 54628bf into letscontrolit:v2.0 Feb 25, 2018
@TD-er TD-er deleted the bugfix/delay_MQTT_reconnects_server_unreachable branch February 25, 2018 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants