Commit f8bff4c6 authored by indexzero's avatar indexzero

[minor] Listen to error events re-emitted by pool into the ClientRequest

parent 6d47d98f
......@@ -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) {
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment