Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/protocol/notification/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ pub(crate) struct NotificationProtocol {
/// Connected peers.
peers: HashMap<PeerId, PeerContext>,

/// Pending outboudn substreams.
/// Pending outbound substreams.
pending_outbound: HashMap<SubstreamId, PeerId>,

/// Handshaking service which reads and writes the handshakes to inbound
Expand Down Expand Up @@ -384,6 +384,8 @@ impl NotificationProtocol {
async fn on_connection_closed(&mut self, peer: PeerId) -> crate::Result<()> {
tracing::trace!(target: LOG_TARGET, ?peer, protocol = %self.protocol, "connection closed");

self.pending_outbound.retain(|_, p| p != &peer);

let Some(context) = self.peers.remove(&peer) else {
tracing::error!(
target: LOG_TARGET,
Expand Down
Loading