Skip to content

Commit cfb25b3

Browse files
committed
Allow unlimited listeners on reverseProxy
reverseProxy can have many subscribers to the 'drain' event when large uploads occur.
1 parent 71183bf commit cfb25b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/node-http-proxy/http-proxy.js

+3
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
354354
res.on('drain', ondrain);
355355
});
356356

357+
// There can be many subscribers to the 'drain' event during large uploads.
358+
reverseProxy.setMaxListeners(0);
359+
357360
//
358361
// Handle 'error' events from the `reverseProxy`. Setup timeout override if needed
359362
//

0 commit comments

Comments
 (0)