diff options
author | Alok Barsode <alok.barsode@linux.intel.com> | 2012-04-05 13:20:22 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-04-05 18:56:36 +0300 |
commit | de943a88d1933a12586948d0afbd908556ab3e9e (patch) | |
tree | 005bbf793142803ca7940e417e73a60e0c01cd65 /src | |
parent | 1f452014fedfe317013245a223084037f9f2280e (diff) | |
download | connman-de943a88d1933a12586948d0afbd908556ab3e9e.tar.gz connman-de943a88d1933a12586948d0afbd908556ab3e9e.tar.bz2 connman-de943a88d1933a12586948d0afbd908556ab3e9e.zip |
ntp: Shorten NTP failure delay
If the NTP server failed to respond, NTP client wait for 16 seconds
before trying the next server. But since now we have the default
gateway as a possible candidate for NTP (which has higher priority over
global timeaservers), there might be a chance that it might fail to
respond to a NTP query (e.g a wifi router without ntp support).
We have to wait for 16 sec, untill NTP switches to the next server.
This seems like a long period, especially if you made timezone changes
and you want the NTP sync to happen asap. Hence reducing this timeout to
5 seconds.
Diffstat (limited to 'src')
-rw-r--r-- | src/ntp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -359,11 +359,11 @@ int __connman_ntp_start(char *server) start_ntp(timeserver); /* - * Add a fallback timeout , preferably longer, 16 sec here, + * Add a fallback timeout , preferably short, 5 sec here, * to fallback on the next server. */ - timeout_id = g_timeout_add_seconds(16, next_server, NULL); + timeout_id = g_timeout_add_seconds(5, next_server, NULL); return 0; } |