@aurox/persistent-websocket-connection
Advanced tools
Comparing version 0.2.1 to 0.2.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_PING_PONG_TOLERANCE_TIMEOUT = exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_PING_PONG_INTERVAL = exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_CONNECTION_CHECK_INTERVAL = exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_RECONNECT_TIMEOUT = void 0; | ||
exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_RECONNECT_TIMEOUT = 2000; | ||
@@ -4,0 +5,0 @@ exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_CONNECTION_CHECK_INTERVAL = 500; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getOptionsWithDefaults = void 0; | ||
const constants_1 = require("./constants"); | ||
@@ -4,0 +5,0 @@ function defaultDoPing(send) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = void 0; | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./constants"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
var PersistentWebsocketConnection_1 = require("./PersistentWebsocketConnection"); | ||
exports.default = PersistentWebsocketConnection_1.default; | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(PersistentWebsocketConnection_1).default; } }); |
@@ -96,4 +96,11 @@ "use strict"; | ||
this.handleNoPong = () => { | ||
const tolerance = this.pingPongOptions.toleranceTimeout / 1000; | ||
this.logger.error(`Connection to ${this.url} ping was not answered by a pong for ${tolerance} second(s), it will be reset.`); | ||
if (this.pingPongOptions.heartbeatOnly) { | ||
const debounce = this.pingPongOptions.heartbeatDebounce ? this.pingPongOptions.heartbeatDebounce : 0; | ||
const tolerance = Number(((this.pingPongOptions.toleranceTimeout + debounce) / 1000).toFixed(3)); | ||
this.logger.error(`Connection to ${this.url}: Heartbeat was not received for ${tolerance} second(s), it will be reset.`); | ||
} | ||
else { | ||
const tolerance = Number((this.pingPongOptions.toleranceTimeout / 1000).toFixed(3)); | ||
this.logger.error(`Connection to ${this.url}: Ping was not answered by a pong for ${tolerance} second(s), it will be reset.`); | ||
} | ||
clearTimeout(this.pingPongTimer); | ||
@@ -100,0 +107,0 @@ this.closedDuoToPongOrHeartbeatTimeout = true; |
{ | ||
"name": "@aurox/persistent-websocket-connection", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Aurox Persistent Websocket Connection", | ||
@@ -19,16 +19,16 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^2.27.0", | ||
"@typescript-eslint/parser": "^2.27.0", | ||
"eslint": "^6.8.0", | ||
"@typescript-eslint/eslint-plugin": "^4.11.0", | ||
"@typescript-eslint/parser": "^4.11.0", | ||
"eslint": "^7.16.0", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^8.8.2", | ||
"typescript": "^3.8.3" | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.3" | ||
}, | ||
"dependencies": { | ||
"@types/node": "^13.11.1", | ||
"@types/ws": "^7.2.3", | ||
"@types/node": "^14.14.16", | ||
"@types/ws": "^7.4.0", | ||
"isomorphic-ws": "^4.0.1", | ||
"tslib": "^1.11.1", | ||
"ws": "^7.2.3" | ||
"tslib": "^2.0.3", | ||
"ws": "^7.4.1" | ||
} | ||
} |
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
19878
411
+ Added@types/node@14.18.63(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@types/node@13.13.52(transitive)
- Removedtslib@1.14.1(transitive)
Updated@types/node@^14.14.16
Updated@types/ws@^7.4.0
Updatedtslib@^2.0.3
Updatedws@^7.4.1