Adjust chronyc timeout
Start at 1 second and increase it exponentially with maximum number of attempts 3.
This commit is contained in:
parent
5b8835f46b
commit
d674d23b45
1 changed files with 3 additions and 3 deletions
6
client.c
6
client.c
|
@ -1190,7 +1190,7 @@ static unsigned long sequence = 0;
|
||||||
static unsigned long utoken = 0;
|
static unsigned long utoken = 0;
|
||||||
static unsigned long token = 0;
|
static unsigned long token = 0;
|
||||||
|
|
||||||
#define MAX_ATTEMPTS 5
|
#define MAX_ATTEMPTS 3
|
||||||
|
|
||||||
|
|
||||||
/* This is the core protocol module. Complete particular fields in
|
/* This is the core protocol module. Complete particular fields in
|
||||||
|
@ -1225,8 +1225,8 @@ submit_request(CMD_Request *request, CMD_Reply *reply, int *reply_auth_ok)
|
||||||
request->utoken = htonl(utoken);
|
request->utoken = htonl(utoken);
|
||||||
request->token = htonl(token);
|
request->token = htonl(token);
|
||||||
|
|
||||||
|
timeout_seconds = 1;
|
||||||
|
|
||||||
timeout_seconds = 2;
|
|
||||||
|
|
||||||
n_attempts = 0;
|
n_attempts = 0;
|
||||||
|
|
||||||
|
@ -1265,7 +1265,7 @@ submit_request(CMD_Request *request, CMD_Reply *reply, int *reply_auth_ok)
|
||||||
timeout.tv_sec = timeout_seconds;
|
timeout.tv_sec = timeout_seconds;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
timeout_seconds += 1;
|
timeout_seconds *= 2;
|
||||||
FD_ZERO(&rdfd);
|
FD_ZERO(&rdfd);
|
||||||
FD_ZERO(&wrfd);
|
FD_ZERO(&wrfd);
|
||||||
FD_ZERO(&exfd);
|
FD_ZERO(&exfd);
|
||||||
|
|
Loading…
Reference in a new issue