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

Commit 0675c65

Browse files
committed
Try race condition fix
1 parent 259ddd7 commit 0675c65

File tree

1 file changed

+0
-15
lines changed
  • client/network/src/protocol/generic_proto/handler

1 file changed

+0
-15
lines changed

client/network/src/protocol/generic_proto/handler/group.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -550,25 +550,10 @@ impl ProtocolsHandler for NotifsHandler {
550550
};
551551
},
552552
State::OpenDesired { in_substreams, .. } => {
553-
if in_substreams[num].is_some() {
554-
// If a substream already exists, silently drop the new one.
555-
// Note that we drop the substream, which will send an equivalent to a
556-
// TCP "RST" to the remote and force-close the substream. It might
557-
// seem like an unclean way to get rid of a substream. However, keep
558-
// in mind that it is invalid for the remote to open multiple such
559-
// substreams, and therefore sending a "RST" is the most correct thing
560-
// to do.
561-
return;
562-
}
563553
in_substreams[num] = Some(proto);
564554
},
565555
State::Opening { in_substreams, .. } |
566556
State::Open { in_substreams, .. } => {
567-
if in_substreams[num].is_some() {
568-
// Same remark as above.
569-
return;
570-
}
571-
572557
// We create `handshake_message` on a separate line to be sure
573558
// that the lock is released as soon as possible.
574559
let handshake_message = self.in_protocols[num].1.read().clone();

0 commit comments

Comments
 (0)