From 3382548a79f6b415e3b902201fc8faff227126e1 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Wed, 6 Nov 2019 19:46:49 -0500 Subject: [PATCH] fix: use the jsonrpc framework reconnect interval --- web3.js/src/connection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 0c9f7ae2bf..fb44a4e9ec 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -1043,8 +1043,10 @@ export class Connection { // 1000 means _rpcWebSocket.close() was called explicitly if (code !== 1000) { console.log('ws close:', code, message); + } else { + // Only after an explicit close do we need to explicitly connect again + this._rpcWebSocketConnected = false; } - this._rpcWebSocketConnected = false; } /**