Skip to content

Commit

Permalink
fix: disable http agent keep alive for postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Dec 30, 2023
1 parent 20a1d61 commit 095b1a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ async function main() {
// Keeps the TCP connection alive when sending multiple requests
// Ref: https://github.com/node-fetch/node-fetch/issues/1735
const agent = proxyUrl
? new HttpsProxyAgent(proxyUrl, { keepAlive: true })
: new Agent({ keepAlive: true });
? new HttpsProxyAgent(proxyUrl, { keepAlive: false })
: new Agent({ keepAlive: false });
const resp = await fetch(url, { agent });

const hash = createHash("sha256");
Expand Down

0 comments on commit 095b1a6

Please sign in to comment.