Skip to content

Commit 30edc25

Browse files
authored
fix request abort for node 16+
http-party#1580
1 parent 9b96cd7 commit 30edc25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/http-proxy/passes/web-incoming.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ module.exports = {
143143
}
144144

145145
// Ensure we abort proxy if request is aborted
146-
req.on('aborted', function () {
147-
proxyReq.abort();
146+
res.on('close', function () {
147+
proxyReq.destroy();
148148
});
149149

150150
// handle errors in proxy and incoming request, just like for forward proxy

0 commit comments

Comments
 (0)