Skip to content

Commit f5d7912

Browse files
authored
Merge pull request #506 from mjackson/patch-3
Return http.Server instance from listen
2 parents d9266b9 + 48e41f1 commit f5d7912

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Server.prototype.setContentHeaders = function(req, res, next) {
311311

312312
// delegate listen call and init sockjs
313313
Server.prototype.listen = function() {
314-
this.listeningApp.listen.apply(this.listeningApp, arguments);
314+
var returnValue = this.listeningApp.listen.apply(this.listeningApp, arguments);
315315
var sockServer = sockjs.createServer({
316316
// Limit useless logs
317317
log: function(severity, line) {
@@ -339,6 +339,7 @@ Server.prototype.listen = function() {
339339
sockServer.installHandlers(this.listeningApp, {
340340
prefix: '/sockjs-node'
341341
});
342+
return returnValue;
342343
}
343344

344345
Server.prototype.close = function() {

0 commit comments

Comments
 (0)