Skip to content

Update NTPClient.ino #339

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

Merged
merged 1 commit into from
May 29, 2015
Merged

Update NTPClient.ino #339

merged 1 commit into from
May 29, 2015

Conversation

moeur
Copy link
Contributor

@moeur moeur commented May 26, 2015

Do not hardwire the NTP server IP address into the code. Instead, look-up the IP address from the host name. This way you will get a different random server from the pool each time you make a request.

Instead of hardwiring the IP address of one server into the program, look-up an IP address from the host name.  This way you get a random server from the pool each time.
@chadouming
Copy link
Contributor

Maybe make it in another example, this adds a lot of overhead since it has to call the DNS.

@moeur
Copy link
Contributor Author

moeur commented May 27, 2015

How much overhead does it really add? If an NTP server IP address is going to be hardwired into the code example, at least don't use one of the servers from a pool, especially not one specifically marked "All services busy, not recommended". Many people will copy and paste this example and use it as-is which could eventually lead to an overloading of the particular server.

On the same note: change the update period to a much longer time for the same reason.

igrr added a commit that referenced this pull request May 29, 2015
@igrr igrr merged commit 11952e1 into esp8266:esp8266 May 29, 2015
igrr added a commit that referenced this pull request Oct 29, 2015
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.

3 participants