File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/transport/stream/src Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -792,7 +792,12 @@ export abstract class DirectStream<
792792 }
793793
794794 try {
795- stream = await connection . newStream ( this . multicodecs ) ;
795+ stream = await connection . newStream ( this . multicodecs , {
796+ // TODO this property seems necessary, together with waitFor isReadable when making sure two peers are conencted before talking.
797+ // research whether we can do without this so we can push data without beeing able to send
798+ // more info here https://github.com/libp2p/js-libp2p/issues/2321
799+ negotiateFully : true ,
800+ } ) ;
796801 if ( stream . protocol == null ) {
797802 stream . abort ( new Error ( "Stream was not multiplexed" ) ) ;
798803 return ;
@@ -2014,8 +2019,7 @@ export abstract class DirectStream<
20142019 const stream = this . peers . get ( hash ) ! ;
20152020 try {
20162021 let checkIsWritable = ( pDefer : DeferredPromise < void > ) => {
2017- // Dont wait for readlable https://github.com/libp2p/js-libp2p/issues/2321
2018- if ( /* stream.isReadable && */ stream . isWritable ) {
2022+ if ( stream . isReadable && stream . isWritable ) {
20192023 pDefer . resolve ( ) ;
20202024 }
20212025 } ;
You can’t perform that action at this time.
0 commit comments