Skip to content

Commit 711258e

Browse files
committed
[minor] Listen to error event on pool so we dont fail out unexpectedly anymore
1 parent f8bff4c commit 711258e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/node-http-proxy.js

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ HttpProxy.prototype = {
123123

124124
// Open new HTTP request to internal resource with will act as a reverse proxy pass
125125
var p = manager.getPool(port, server);
126+
127+
p.on('error', function (err) {
128+
// Remark: We should probably do something here
129+
// but this is a hot-fix because I don't think 'pool'
130+
// should be emitting this event.
131+
});
126132

127133
p.request(req.method, req.url, req.headers, function (reverse_proxy) {
128134
// Create an error handler so we can use it temporarily

0 commit comments

Comments
 (0)