mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Fixes memory leak when clients abort connections
This commit is contained in:
parent
c5dc9295c7
commit
c98ccb40e9
@ -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.
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user