File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,6 @@ class PubsubBaseProtocol extends EventEmitter {
178178 protocols : [ protocol ]
179179 } ) )
180180
181- peer . attachConnection ( stream )
182181 this . _processMessages ( idB58Str , stream , peer )
183182 }
184183
@@ -200,7 +199,6 @@ class PubsubBaseProtocol extends EventEmitter {
200199 try {
201200 const { stream } = await conn . newStream ( this . multicodecs )
202201 peer . attachConnection ( stream )
203- this . _processMessages ( idB58Str , stream , peer )
204202 } catch ( err ) {
205203 this . log . err ( err )
206204 }
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ class Peer extends EventEmitter {
8787 this . conn = conn
8888 this . stream = pushable ( {
8989 onEnd : ( ) => {
90+ // close readable side of the stream
91+ this . conn . reset && this . conn . reset ( )
9092 this . conn = null
9193 this . stream = null
9294 this . emit ( 'close' )
You can’t perform that action at this time.
0 commit comments