Closed tannewt closed 2 years ago
I'm not sure it works with ESP32SPI. get_time()
on ESP32SPI already gets the time from NTP I believe.
Any chance you could add a socket timeout? My code frequently hangs during the ntp call (eg if the connection is lost), but passing a timeout can resolve this, ie. put a socket_timeout as an additional argument and then call sock.settimeout(self._socket_timeout) before the sock.sendto Cheers
Any chance you could add a socket timeout? My code frequently hangs during the ntp call (eg if the connection is lost), but passing a timeout can resolve this, ie. put a socket_timeout as an additional argument and then call sock.settimeout(self._socket_timeout) before the sock.sendto Cheers
Please open an issue. They are much easier to track than comments on merged PRs. I don't plan on adding a timeout soon but am happy to help you do it. Let's sync on the issue.
This completely redoes the library in favor of using a native socket to fetch time from an NTP server.
Fixes #17 and fixes #16