fix: don't keep connection alive (#12096)

This commit is contained in:
Nikolay Vitkov 2024-03-15 14:18:45 +01:00 committed by GitHub
parent a1c527df96
commit 0a142bf0aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,9 @@ export function httpRequest(
res.headers.location
) {
httpRequest(new URL(res.headers.location), method, response);
// consume response data to free up memory
// And prevents the connection from being kept alive
res.resume();
} else {
response(res);
}