From fef2d11850379a4720bb9c736236a81a067dc901 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Wed, 30 May 2018 17:05:42 +0100 Subject: [PATCH] fix: return on call to nextMuxer 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 --- src/dial.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dial.js b/src/dial.js index 450265c733..116c628847 100644 --- a/src/dial.js +++ b/src/dial.js @@ -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)