Skip to content

Commit 976512d

Browse files
committed
Merge pull request #287 from jhchen/master
add close() api
2 parents 43c0104 + 39f418f commit 976512d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ Server.prototype.listen = function() {
277277
}.bind(this));
278278
}
279279

280+
Server.prototype.close = function() {
281+
this.io.close(); // Will also close listeningApp
282+
this.middleware.close();
283+
}
284+
280285
Server.prototype.serveMagicHtml = function(req, res, next) {
281286
var _path = req.path;
282287
try {

0 commit comments

Comments
 (0)