File tree 2 files changed +2
-2
lines changed
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 {
178
178
protocols : [ protocol ]
179
179
} ) )
180
180
181
- peer . attachConnection ( stream )
182
181
this . _processMessages ( idB58Str , stream , peer )
183
182
}
184
183
@@ -200,7 +199,6 @@ class PubsubBaseProtocol extends EventEmitter {
200
199
try {
201
200
const { stream } = await conn . newStream ( this . multicodecs )
202
201
peer . attachConnection ( stream )
203
- this . _processMessages ( idB58Str , stream , peer )
204
202
} catch ( err ) {
205
203
this . log . err ( err )
206
204
}
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ class Peer extends EventEmitter {
87
87
this . conn = conn
88
88
this . stream = pushable ( {
89
89
onEnd : ( ) => {
90
+ // close readable side of the stream
91
+ this . conn . reset && this . conn . reset ( )
90
92
this . conn = null
91
93
this . stream = null
92
94
this . emit ( 'close' )
You can’t perform that action at this time.
0 commit comments