Node.prototype.stop = function() { if(this._socket) socket.end(); if(this.updateInterval) clearInterval(this.updateInterval); if(this.pingInterval) clearInterval(this.pingInterval); web3.reset(); }
Node.prototype.reconnectWeb3 = function() { console.warn("Uninstalling filters and update interval"); this._web3 = false; this._connection_attempts = 0; if(this.updateInterval) clearInterval(this.updateInterval); try { web3.reset(); } catch (err) { console.error("Web3 reset error:", err); } console.info("Web3 reconnect attempts started"); this.checkWeb3Connection(); }