Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Discard notifications if we have failed to parse handshake (#8806)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored Jun 2, 2021
1 parent 538b15f commit 437c838
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/network/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,9 @@ impl<B: BlockT> NetworkBehaviour for Protocol<B> {
);
CustomMessageOutcome::None
}
_ if self.bad_handshake_substreams.contains(&(peer_id.clone(), set_id)) => {
CustomMessageOutcome::None
}
_ => {
let protocol_name = self.notification_protocols[usize::from(set_id) - NUM_HARDCODED_PEERSETS].clone();
CustomMessageOutcome::NotificationsReceived {
Expand Down

0 comments on commit 437c838

Please sign in to comment.