1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-09 12:58:26 +03:00

timesync: Keep trying to connect even if the socket cannot be opened

This makes sure that after a server could not be contacted due to a
socket error, other (possibly working) NTP servers in the list of
configured NTP servers are (re-)tried.

Fixes #25728.
This commit is contained in:
Felix Riemann 2022-12-14 15:02:39 +01:00 committed by Yu Watanabe
parent a76d7acae1
commit 9b4e04f0cd

View File

@ -119,8 +119,10 @@ static int manager_send_request(Manager *m) {
m->event_timeout = sd_event_source_unref(m->event_timeout);
r = manager_listen_setup(m);
if (r < 0)
return log_warning_errno(r, "Failed to set up connection socket: %m");
if (r < 0) {
log_warning_errno(r, "Failed to set up connection socket: %m");
return manager_connect(m);
}
/*
* Set transmit timestamp, remember it; the server will send that back