Fixes memory leak when clients abort connections

This commit is contained in:
Camilo Aguilar 2011-11-15 20:20:47 -05:00
parent c5dc9295c7
commit c98ccb40e9

View File

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