Remove unused EventEmitter object

pull/22966/head
Ryan Dahl 2010-03-03 12:41:31 -08:00
parent 0dba38eef0
commit 64d0e328e8
1 changed files with 1 additions and 7 deletions

View File

@ -317,10 +317,6 @@ ClientRequest.prototype.close = function () {
function createIncomingMessageStream (connection, incoming_listener) {
var stream = new events.EventEmitter();
stream.addListener("incoming", incoming_listener);
var incoming, field, value;
connection.addListener("messageBegin", function () {
@ -372,7 +368,7 @@ function createIncomingMessageStream (connection, incoming_listener) {
incoming.statusCode = info.statusCode;
}
stream.emit("incoming", incoming, info.should_keep_alive);
incoming_listener(incoming, info.should_keep_alive);
});
connection.addListener("body", function (chunk) {
@ -382,8 +378,6 @@ function createIncomingMessageStream (connection, incoming_listener) {
connection.addListener("messageComplete", function () {
incoming.emit('end');
});
return stream;
}
/* Returns true if the message queue is finished and the connection