loadmill-monitor
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -47,2 +47,4 @@ const WebSocket = require('ws'); | ||
this.ws.on('unexpected-response', this._handleUnexpectedResponse.bind(this)); | ||
this._bindHandler('open', this._onOpen); | ||
@@ -54,2 +56,9 @@ this._bindHandler('error', this._onError); | ||
_handleUnexpectedResponse(req, res) { | ||
this._onClose({ | ||
code: res.statusCode === 401 ? 3000 : 1000, | ||
reason: "Server response was " + res.statusCode + " " + res.statusMessage | ||
}); | ||
} | ||
_bindHandler(event, handler) { | ||
@@ -80,2 +89,3 @@ this.ws['on' + event] = handler.bind(this); | ||
setTimeout(this.listen.bind(this), reopenDelay) | ||
.unref(); | ||
} | ||
@@ -82,0 +92,0 @@ } |
{ | ||
"name": "loadmill-monitor", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Performance monitoring for Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
19263
254