mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Fix two potential connection poisonings (#7677)
This commit is contained in:
@@ -1565,6 +1565,7 @@ impl NetworkBehaviour for GenericProto {
|
||||
connec_state,
|
||||
ConnectionState::OpeningThenClosing
|
||||
));
|
||||
*entry.into_mut() = PeerState::Disabled { connections, backoff_until };
|
||||
}
|
||||
} else {
|
||||
error!(
|
||||
@@ -1652,6 +1653,7 @@ impl NetworkBehaviour for GenericProto {
|
||||
};
|
||||
|
||||
if matches!(connections[pos].1, ConnectionState::Closing) {
|
||||
*entry.into_mut() = PeerState::Enabled { connections };
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1683,7 +1685,7 @@ impl NetworkBehaviour for GenericProto {
|
||||
notifications_sink: replacement_sink,
|
||||
};
|
||||
self.events.push_back(NetworkBehaviourAction::GenerateEvent(event));
|
||||
*entry.into_mut() = PeerState::Enabled { connections, };
|
||||
*entry.into_mut() = PeerState::Enabled { connections };
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user