request.js: Use correct HttpsAgent option for localAddress

This commit is contained in:
Marcel 2021-11-01 17:40:09 +01:00 committed by GitHub
parent c270eed998
commit 4492b3a376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ if (proxyAddress) {
.map((addr) => {
const family = isIP(addr)
if (family === 0) throw new Error('invalid local address:' + addr)
return new HttpsAgent({addr, family})
return new HttpsAgent({localAddress: addr, family})
})
const pool = roundRobin(agents)
getAgent = () => pool.get()