mirror of https://github.com/nodejs/node.git
Making requestListener for the construction of a http.Server optional, as it is for net.Server
parent
f990f24ad3
commit
d6110fbd11
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue