[minor] Listen to error event on pool so we dont fail out unexpectedly anymore

This commit is contained in:
indexzero 2010-09-10 17:41:59 -04:00
parent f8bff4c618
commit 711258ef46

View File

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