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 {
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 ( ) ;
You can’t perform that action at this time.
0 commit comments