diff options
author | Kay Sievers <kay@vrfy.org> | 2014-09-02 14:33:59 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-09-02 14:33:59 +0200 |
commit | 80cd2606b91ce2735a0609c6f964917cf12685aa (patch) | |
tree | 716e9d44b591608805c85afa188b01c142114786 /src | |
parent | e8206972be6a7ebeb198cd0d400bc7a94a6a5fc5 (diff) |
timesyncd: don't reset polling interval when reselecting server
Original patch from: Miroslav Lichvar <mlichvar@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/timesync/timesyncd-manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index a66852d7d2..3261bc1fb1 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -721,7 +721,8 @@ static int manager_begin(Manager *m) { assert_return(m->current_server_address, -EHOSTUNREACH); m->missed_replies = NTP_MAX_MISSED_REPLIES; - m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC; + if (m->poll_interval_usec == 0) + m->poll_interval_usec = NTP_POLL_INTERVAL_MIN_SEC * USEC_PER_SEC; server_address_pretty(m->current_server_address, &pretty); log_info("Using NTP server %s (%s).", strna(pretty), m->current_server_name->string); |