This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
client/network/src/protocol/generic_proto/handler Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -550,25 +550,10 @@ impl ProtocolsHandler for NotifsHandler {
550
550
} ;
551
551
} ,
552
552
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
- }
563
553
in_substreams[ num] = Some ( proto) ;
564
554
} ,
565
555
State :: Opening { in_substreams, .. } |
566
556
State :: Open { in_substreams, .. } => {
567
- if in_substreams[ num] . is_some ( ) {
568
- // Same remark as above.
569
- return ;
570
- }
571
-
572
557
// We create `handshake_message` on a separate line to be sure
573
558
// that the lock is released as soon as possible.
574
559
let handshake_message = self . in_protocols [ num] . 1 . read ( ) . clone ( ) ;
You can’t perform that action at this time.
0 commit comments