Browse Source

Remove unused EventEmitter object

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
64d0e328e8
  1. 8
      lib/http.js

8
lib/http.js

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

Loading…
Cancel
Save