We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 943e024 commit 1cf6549Copy full SHA for 1cf6549
lib/Server.js
@@ -380,13 +380,14 @@ Server.prototype.listen = function() {
380
return returnValue;
381
}
382
383
-Server.prototype.close = function() {
+Server.prototype.close = function(callback) {
384
this.sockets.forEach(function(sock) {
385
sock.close();
386
});
387
this.sockets = [];
388
- this.middleware.close();
389
- this.listeningApp.close();
+ this.listeningApp.close(function() {
+ this.middleware.close(callback);
390
+ }.bind(this));
391
392
393
Server.prototype.sockWrite = function(sockets, type, data) {
0 commit comments