chore: enable keepAlive in happy eyeballs http.Agent
This commit is contained in:
parent
a6b6b243d0
commit
36b85c7af4
|
|
@ -45,8 +45,9 @@ class HttpsHappyEyeballsAgent extends https.Agent {
|
|||
}
|
||||
}
|
||||
|
||||
export const httpsHappyEyeballsAgent = new HttpsHappyEyeballsAgent();
|
||||
export const httpHappyEyeballsAgent = new HttpHappyEyeballsAgent();
|
||||
// These options are aligned with the default Node.js globalAgent options.
|
||||
export const httpsHappyEyeballsAgent = new HttpsHappyEyeballsAgent({ keepAlive: true, scheduling: 'lifo', timeout: 5000 });
|
||||
export const httpHappyEyeballsAgent = new HttpHappyEyeballsAgent({ keepAlive: true, scheduling: 'lifo', timeout: 5000 });
|
||||
|
||||
export async function createSocket(host: string, port: number): Promise<net.Socket> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue