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

NTPClient::sendNTPPacket() does not check whether this->_udp->beginPacket actually began. #162

Open
JonathanJamesStewart opened this issue Dec 31, 2021 · 2 comments · May be fixed by #177
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@JonathanJamesStewart
Copy link

https://github.com/arduino-libraries/NTPClient/blob/master/NTPClient.cpp#L200

When this->_udp->beginPacket(...) fails because of DNS lookup failure or some other reason this causes the device to panic when it tries to read the result.

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jan 15, 2022
@MHotchin
Copy link

MHotchin commented Oct 1, 2022

Pull request #177 would fix this.

@per1234 per1234 linked a pull request Oct 2, 2022 that will close this issue
@JXAS
Copy link

JXAS commented Jul 21, 2024

Got the same issue on a Teensy 4.1. First call to update() or forceUpdate() is OK but next always fail if the NTP pool server is provided as a name. If the pool server is provided as a IP number, it always works.
Seems that DNS does not resolve IP after the first access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants