diff options
Diffstat (limited to 'src/state/peer.rs')
| -rw-r--r-- | src/state/peer.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/state/peer.rs b/src/state/peer.rs index c6558d7..1e09079 100644 --- a/src/state/peer.rs +++ b/src/state/peer.rs @@ -151,6 +151,8 @@ pub(crate) struct PeerState { /// says so). Both lazy (announced only) until a pull makes ours eager. pub(crate) eager_to: bool, pub(crate) eager_from: bool, + /// Whom it said it reaches (`swarm::reach`), by pair key, and when. + pub(crate) reaches: Option<(Instant, Vec<u64>)>, /// It said farewell (`say_farewell`): what else that run of it still sends while it /// stops doesn't make it active again; a message from another run does (`returned`). @@ -244,6 +246,7 @@ impl PeerState { last_heads: None, eager_to: false, eager_from: false, + reaches: None, left: false, hello_attempts: 0, unreachable_since: None, @@ -262,6 +265,8 @@ impl PeerState { // The link starts lazy again: a pull makes it eager when it proves itself. self.eager_to = false; self.eager_from = false; + // Said over the session that ended. + self.reaches = None; } /// An overdue sync answer from an established, active peer (see |
