Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
fix: return on call to nextMuxer
Browse files Browse the repository at this point in the history
When the call to multistream.Dialer.select is unsuccessful, call nextMuxer to try select the next one in the list but do not continue executing callback afterwards.

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
  • Loading branch information
alanshaw authored and Jacob Heun committed May 30, 2018
1 parent 4b60484 commit fef2d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dial.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Dialer {
return callback(new Error('could not upgrade to stream muxing'))
}

nextMuxer(muxers.shift())
return nextMuxer(muxers.shift())
}

const muxedConn = this.switch.muxers[key].dialer(conn)
Expand Down

0 comments on commit fef2d11

Please sign in to comment.