Constant zebra_network::constants::MIN_PEER_RECONNECTION_DELAY

source ยท
pub const MIN_PEER_RECONNECTION_DELAY: Duration;
Expand description

We expect to receive a message from a live peer at least once in this time duration.

This is the sum of:

  • the interval between connection heartbeats
  • the timeout of a possible pending (already-sent) request
  • the timeout for a possible queued request
  • the timeout for the heartbeat request itself

This avoids explicit synchronization, but relies on the peer connector actually setting up channels and these heartbeats in a specific manner that matches up with this math.