Skip to content

Commit

Permalink
fix: call connection.addStream properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun committed Feb 5, 2020
1 parent 850b5c9 commit cc54d50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/upgrader.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ 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)
this._onStream({ connection, stream, protocol })
connection.addStream(muxedStream, { protocol })
this._onStream({ connection, stream: muxedStream, protocol })
} catch (err) {
log.error(err)
}
Expand Down

0 comments on commit cc54d50

Please sign in to comment.