Mercurial > dovecot > core-2.2
changeset 22565:ad4d877d655b
director: Don't reset directors' last_network_failure while handshaking
The reset is done mainly to make it faster for a director that has been down
to connect back to the ring, without other directors still thinking that
it's down. But DIRECTOR that is sent during handshake says nothing about
whether the director is up at the moment or not.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 14 Sep 2017 17:38:24 +0300 |
parents | 17b1e65e6d70 |
children | 98b21e27d66c |
files | src/director/director-connection.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/director-connection.c Thu Sep 14 17:35:02 2017 +0300 +++ b/src/director/director-connection.c Thu Sep 14 17:38:24 2017 +0300 @@ -761,8 +761,12 @@ } /* already have this. just reset its last_network_failure - timestamp, since it might be up now. */ - host->last_network_failure = 0; + timestamp, since it might be up now, but only if this + isn't part of the handshake. (if it was, reseting the + timestamp could cause us to rapidly keep trying to connect + to it) */ + if (conn->handshake_received) + host->last_network_failure = 0; /* it also may have been restarted, reset its state */ director_host_restarted(host); } else {