Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exorelay

Package Overview
Dependencies
Maintainers
4
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exorelay - npm Package Compare versions

Comparing version 0.26.2 to 0.26.3

24

dist/websocket-connector/websocket-connector.js

@@ -88,4 +88,10 @@ // Generated by LiveScript 1.5.0

WebSocketConnector.prototype.connect = function(){
this.startConnectTime = Date.now();
this.logConnectErrorDelay = 1000;
this.shouldReconnectOnSocketClosed = true;
this.shouldUseInternalReconnect = true;
return this._internalConnect();
};
WebSocketConnector.prototype._internalConnect = function(){
var x$;
this.shouldReconnectOnSocketClosed = true;
x$ = this.socket = new WebSocket("ws://" + this.exocomHost + ":" + this.exocomPort + "/services");

@@ -99,8 +105,14 @@ x$.on('open', this._onSocketOpen);

WebSocketConnector.prototype._onSocketClose = function(){
this.emit('offline');
if (this.shouldReconnectOnSocketClosed) {
return this.connect();
if (this.shouldUseInternalReconnect) {
return this._internalConnect();
} else {
return this.connect();
}
} else {
return this.emit('offline');
}
};
WebSocketConnector.prototype._onSocketOpen = function(){
this.shouldUseInternalReconnect = false;
return this.emit('online');

@@ -112,2 +124,8 @@ };

return this.emit('error', "port " + this.exocomPort + " is already in use");
case this.socket.readyState !== WebSocket.CONNECTING:
if (Date.now() > this.startConnectTime + this.logConnectErrorDelay) {
this.emit('error', "Could not connect after " + this.logConnectErrorDelay + "ms: " + error.message);
return this.logConnectErrorDelay = this.logConnectErrorDelay * 2;
}
break;
default:

@@ -114,0 +132,0 @@ return this.emit('error', error);

2

package.json
{
"name": "exorelay",
"version": "0.26.2",
"version": "0.26.3",
"author": "Kevin Goslar",

@@ -5,0 +5,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc