From 8df8084ec70364c648ad0cd7b574a55cf36d41a7 Mon Sep 17 00:00:00 2001 From: Jack Kleeman Date: Mon, 27 Mar 2017 16:10:20 +0100 Subject: [PATCH] fix(dial): pass through errors from pull-ws onConnect Not passing errors meant that failed websocket connections were being treated as successful dials. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b7acf9e..2d01764 100644 --- a/src/index.js +++ b/src/index.js @@ -24,7 +24,7 @@ class WebSockets { log('dialing %s', url) const socket = connect(url, { binary: true, - onConnect: () => callback() + onConnect: (err) => callback(err) }) const conn = new Connection(socket)