From 711258ef469d064cc0dbe0f0320ed1047ed0bd54 Mon Sep 17 00:00:00 2001 From: indexzero Date: Fri, 10 Sep 2010 17:41:59 -0400 Subject: [PATCH] [minor] Listen to error event on pool so we dont fail out unexpectedly anymore --- lib/node-http-proxy.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index bbb5b0f..a9a34ad 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -123,6 +123,12 @@ HttpProxy.prototype = { // Open new HTTP request to internal resource with will act as a reverse proxy pass var p = manager.getPool(port, server); + + p.on('error', function (err) { + // Remark: We should probably do something here + // but this is a hot-fix because I don't think 'pool' + // should be emitting this event. + }); p.request(req.method, req.url, req.headers, function (reverse_proxy) { // Create an error handler so we can use it temporarily