rpc-websockets
Advanced tools
Comparing version 7.5.0 to 7.5.1
@@ -30,2 +30,3 @@ /** | ||
private reconnect; | ||
private reconnect_timer_id; | ||
private reconnect_interval; | ||
@@ -32,0 +33,0 @@ private max_reconnects; |
@@ -40,2 +40,3 @@ /** | ||
this.reconnect = reconnect; | ||
this.reconnect_timer_id = undefined; | ||
this.reconnect_interval = reconnect_interval; | ||
@@ -188,2 +189,3 @@ this.max_reconnects = max_reconnects; | ||
_connect(address, options) { | ||
clearTimeout(this.reconnect_timer_id); | ||
this.socket = this.webSocketFactory(address, options); | ||
@@ -252,5 +254,5 @@ this.socket.addEventListener("open", () => { | ||
this.max_reconnects === 0)) | ||
setTimeout(() => this._connect(address, options), this.reconnect_interval); | ||
this.reconnect_timer_id = setTimeout(() => this._connect(address, options), this.reconnect_interval); | ||
}); | ||
} | ||
} |
@@ -30,2 +30,3 @@ /** | ||
private reconnect; | ||
private reconnect_timer_id; | ||
private reconnect_interval; | ||
@@ -32,0 +33,0 @@ private max_reconnects; |
@@ -93,2 +93,3 @@ /** | ||
_this.reconnect = reconnect; | ||
_this.reconnect_timer_id = undefined; | ||
_this.reconnect_interval = reconnect_interval; | ||
@@ -407,2 +408,3 @@ _this.max_reconnects = max_reconnects; | ||
clearTimeout(this.reconnect_timer_id); | ||
this.socket = this.webSocketFactory(address, options); | ||
@@ -473,3 +475,3 @@ this.socket.addEventListener("open", function () { | ||
_this4.current_reconnects++; | ||
if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) setTimeout(function () { | ||
if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) _this4.reconnect_timer_id = setTimeout(function () { | ||
return _this4._connect(address, options); | ||
@@ -476,0 +478,0 @@ }, _this4.reconnect_interval); |
{ | ||
"name": "rpc-websockets", | ||
"version": "7.5.0", | ||
"version": "7.5.1", | ||
"description": "JSON-RPC 2.0 implementation over WebSockets for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5434598
6379