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.
}
/* 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 {