client: fix waitsync command to reconnect to server
If chronyc waitsync was started before chronyd, it would try all addresses (Unix socket, IPv4, IPv6) and get stuck with no address, not getting any response later when chronyd was running. Reset the address index in open_io() when returning with failure to allow the next call to start with the first address again. Reported-by: Jan Mikkelsen <janm@transactionware.com>
This commit is contained in:
parent
b61cbed689
commit
759580aa6f
1 changed files with 3 additions and 0 deletions
3
client.c
3
client.c
|
@ -283,6 +283,9 @@ open_io(void)
|
||||||
close_io();
|
close_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Start from the first address if called again */
|
||||||
|
address_index = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue