Making requestListener for the construction of a http.Server optional, as it is for net.Server

pull/22966/head
Micheil Smith 2010-04-30 23:35:51 +10:00 committed by Ryan Dahl
parent f990f24ad3
commit d6110fbd11
1 changed files with 5 additions and 1 deletions

View File

@ -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);