public void OnPeerUpdated(PeerId peerId, PeerUpdateAction peerUpdateAction) { _innerTransport.OnPeerUpdated(peerId, peerUpdateAction); if (!peerId.IsPersistence()) return; if (peerUpdateAction == PeerUpdateAction.Started) { _persistenceIsDown = false; ReplayMessagesWaitingForPersistence(); } else if (peerUpdateAction == PeerUpdateAction.Decommissioned) { _persistenceIsDown = true; } }
public void OnPeerUpdated(PeerId peerId, PeerUpdateAction peerUpdateAction) { if (peerId == PeerId) { return; } if (peerUpdateAction == PeerUpdateAction.Decommissioned && !peerId.IsPersistence()) { Disconnect(peerId); } // Forgetting a peer when it starts up make sure we don't have a stale socket for it, at the cost of losing the send buffer safety if (peerUpdateAction == PeerUpdateAction.Started) { Disconnect(peerId, delayed: false); } }
public void OnPeerUpdated(PeerId peerId, PeerUpdateAction peerUpdateAction) { _innerTransport.OnPeerUpdated(peerId, peerUpdateAction); if (!peerId.IsPersistence()) { return; } if (peerUpdateAction == PeerUpdateAction.Started) { _persistenceIsDown = false; ReplayMessagesWaitingForPersistence(); } else if (peerUpdateAction == PeerUpdateAction.Decommissioned) { _persistenceIsDown = true; } }