Skip to content

Commit

Permalink
[minor] Listen to error events re-emitted by pool into the ClientRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Sep 10, 2010
1 parent 6d47d98 commit f8bff4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/node-http-proxy.js
Expand Up @@ -137,7 +137,7 @@ HttpProxy.prototype = {
};

// Add a listener for the connection timeout event
reverse_proxy.connection.addListener('error', error);
reverse_proxy.addListener('error', error);

// Add a listener for the reverse_proxy response event
reverse_proxy.addListener('response', function (response) {
Expand Down Expand Up @@ -173,7 +173,7 @@ HttpProxy.prototype = {
// At the end of the client request, we are going to stop the proxied request
req.addListener('end', function () {
reverse_proxy.end();
reverse_proxy.connection.removeListener('error', error);
reverse_proxy.removeListener('error', error);
});

self.unwatch(req);
Expand Down

0 comments on commit f8bff4c

Please sign in to comment.