diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-06 01:37:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-06 01:37:13 +0200 |
commit | becad8f1ed696433b9841cbb9c4603c303338d30 (patch) | |
tree | 07dc2e3d386fd007370c1bc73f5e193bbdcf4e57 /src | |
parent | 7a183c4c739665b1be3033fe70933ef236686b58 (diff) |
timesyncd: also try next server when sendto() fails
Diffstat (limited to 'src')
-rw-r--r-- | src/timesync/timesyncd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index bbffbbd863..26d26b0d6d 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -86,7 +86,7 @@ #define RETRY_USEC (30*USEC_PER_SEC) #define RATELIMIT_INTERVAL_USEC (10*USEC_PER_SEC) -#define RATELIMIT_BURST 5 +#define RATELIMIT_BURST 10 struct ntp_ts { be32_t sec; @@ -245,8 +245,10 @@ static int manager_send_request(Manager *m) { if (len == sizeof(ntpmsg)) { m->pending = true; log_debug("Sent NTP request to %s (%s)", pretty, m->current_server_name->string); - } else + } else { log_debug("Sending NTP request to %s (%s) failed: %m", pretty, m->current_server_name->string); + return manager_connect(m); + } /* re-arm timer with incresing timeout, in case the packets never arrive back */ if (m->retry_interval > 0) { |