From cec7c44f6107306ba1cd008f4f389489517dabe8 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 30 Sep 2015 14:20:49 +0200 Subject: [PATCH] client: don't shorten default timeout with ASYNCDNS With connected sockets recv() should fail immediately if chronyd is not listening on localhost and with the Unix socket connecting should fail. --- chrony.texi.in | 4 +--- client.c | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/chrony.texi.in b/chrony.texi.in index 6a740d5..c0f8b1c 100644 --- a/chrony.texi.in +++ b/chrony.texi.in @@ -4526,9 +4526,7 @@ in milliseconds. If no response is received from @code{chronyd}, the timeout is doubled and the request is resent. The maximum number of retries is configured with the @code{retries} command (@pxref{retries command}). -By default, the timeout is 1000 milliseconds or 100 milliseconds if -@code{chronyc} is contacting localhost (i.e. the `-h' option wasn't specified) -and @code{chronyd} was compiled with asynchronous name resolving. +By default, the timeout is 1000 milliseconds. @c }}} @c {{{ tracking @node tracking command diff --git a/client.c b/client.c index a02da4d..234c9b3 100644 --- a/client.c +++ b/client.c @@ -2710,9 +2710,6 @@ main(int argc, char **argv) if (!hostnames) { hostnames = DEFAULT_COMMAND_SOCKET",127.0.0.1,::1"; -#ifdef FEAT_ASYNCDNS - initial_timeout /= 10; -#endif } UTI_SetQuitSignalsHandler(signal_handler);