Comparing version 6.0.0 to 6.1.0
@@ -115,2 +115,4 @@ 'use strict'; | ||
close (cb) { | ||
if (cb) this.once('close', cb); | ||
// | ||
@@ -132,6 +134,9 @@ // Terminate all associated clients. | ||
// | ||
if (this.options.port != null) return server.close(cb); | ||
if (this.options.port != null) { | ||
server.close(() => this.emit('close')); | ||
return; | ||
} | ||
} | ||
if (cb) cb(); | ||
process.nextTick(emitClose, this); | ||
} | ||
@@ -323,2 +328,12 @@ | ||
/** | ||
* Emit a `'close'` event on an `EventEmitter`. | ||
* | ||
* @param {EventEmitter} server The event emitter | ||
* @private | ||
*/ | ||
function emitClose (server) { | ||
server.emit('close'); | ||
} | ||
/** | ||
* Handle premature socket errors. | ||
@@ -325,0 +340,0 @@ * |
{ | ||
"name": "ws", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js", | ||
@@ -36,12 +36,12 @@ "keywords": [ | ||
"bufferutil": "~4.0.0", | ||
"eslint": "~5.0.0", | ||
"eslint-config-standard": "~11.0.0", | ||
"eslint-plugin-import": "~2.13.0", | ||
"eslint": "~5.6.1", | ||
"eslint-config-standard": "~12.0.0", | ||
"eslint-plugin-import": "~2.14.0", | ||
"eslint-plugin-node": "~7.0.0", | ||
"eslint-plugin-promise": "~3.8.0", | ||
"eslint-plugin-standard": "~3.1.0", | ||
"eslint-plugin-promise": "~4.0.0", | ||
"eslint-plugin-standard": "~4.0.0", | ||
"mocha": "~5.2.0", | ||
"nyc": "~12.0.2", | ||
"nyc": "~13.0.1", | ||
"utf-8-validate": "~5.0.0" | ||
} | ||
} |
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
99539
2725