diff --git a/lib/http.js b/lib/http.js index 7cea1d71a6..90feb8a282 100644 --- a/lib/http.js +++ b/lib/http.js @@ -521,7 +521,11 @@ function flushMessageQueue (socket, queue) { function Server (requestListener) { net.Server.call(this); - this.addListener("request", requestListener); + + if(requestListener){ + this.addListener("request", requestListener); + } + this.addListener("connection", connectionListener); } sys.inherits(Server, net.Server);