From 452fd1b785e5198a7b28d82faad058ce70cd0e35 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 1 Nov 2018 20:42:14 -0700 Subject: [PATCH] fix: correct default websocket port --- web3.js/src/connection.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 90d8edd4bf..fb48c471a3 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -225,6 +225,9 @@ export class Connection { url.protocol = 'ws'; url.host = ''; url.port = String(Number(url.port) + 1); + if (url.port === '1') { + url.port = '8900'; + } this._rpcWebSocket = new RpcWebSocketClient( urlFormat(url), {