fix: expose the muxed stream interface on inbound streams

This commit is contained in:
Jacob Heun
2020-05-26 13:55:40 +02:00
parent 698c1df1b4
commit 52a615f922
2 changed files with 36 additions and 1 deletions

View File

@ -232,7 +232,7 @@ class Upgrader {
log('%s: incoming stream opened on %s', direction, protocol)
if (this.metrics) this.metrics.trackStream({ stream, remotePeer, protocol })
connection.addStream(muxedStream, { protocol })
this._onStream({ connection, stream, protocol })
this._onStream({ connection, stream: { ...muxedStream, ...stream }, protocol })
} catch (err) {
log.error(err)
}