Commit c98ccb40 authored by Camilo Aguilar's avatar Camilo Aguilar

Fixes memory leak when clients abort connections

parent c5dc9295
...@@ -326,6 +326,13 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) { ...@@ -326,6 +326,13 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
} }
}); });
//Aborts reverseProxy if client aborts the connection.
req.on('close', function () {
if (!errState) {
reverseProxy.abort();
}
});
// //
// If we have been passed buffered data, resume it. // If we have been passed buffered data, resume it.
// //
......
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