nerves-time / nerves_time

Keep time in sync on Nerves devices
Other
23 stars 13 forks source link

don't prep ntp if no servers are configured #161

Closed joshk closed 5 months ago

joshk commented 5 months ago

when switching off NTP you see these messages:

11:19:01.455 [warning] ntpd crash detected. Delaying next start...

11:19:01.464 [warning] Not scheduling ntpd to start since no servers configured

this PR removes the first warning by skipping the prep function if no servers are configured

Additionally, I noticed that the udp socket wasn't being closed and cleaned up during stop_ntpd, and that the path to the ntpd used in tests (in config.exs) needed a full path for the tests to work correctly and stop a bunch of errors in the logs.

fhunleth commented 5 months ago

All of the changes look good. Thank you!