mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-23 05:51:37 +00:00
fix: ensure identify streams are closed (#551)
* fix: ensure identify streams are closed * fix: call connection.addStream properly * chore: simplify stream closure * test: improve durability of identify push test
This commit is contained in:
@ -231,7 +231,7 @@ class Upgrader {
|
||||
const { stream, protocol } = await mss.handle(Array.from(this.protocols.keys()))
|
||||
log('%s: incoming stream opened on %s', direction, protocol)
|
||||
if (this.metrics) this.metrics.trackStream({ stream, remotePeer, protocol })
|
||||
connection.addStream(stream, protocol)
|
||||
connection.addStream(muxedStream, { protocol })
|
||||
this._onStream({ connection, stream, protocol })
|
||||
} catch (err) {
|
||||
log.error(err)
|
||||
|
Reference in New Issue
Block a user