feat(fs): use keepalive for queries to s3 (#6018)

This commit is contained in:
Florent BEAUCHAMP
2021-11-27 10:10:19 +01:00
committed by GitHub
parent 6e4bfe8f0f
commit 1f1ae759e0

View File

@@ -30,11 +30,12 @@ export default class S3Handler extends RemoteHandlerAbstract {
},
}
if (protocol === 'http') {
params.httpOptions.agent = new http.Agent()
params.httpOptions.agent = new http.Agent({ keepAlive: true })
params.sslEnabled = false
} else if (protocol === 'https' && allowUnauthorized === true) {
} else if (protocol === 'https') {
params.httpOptions.agent = new https.Agent({
rejectUnauthorized: false,
rejectUnauthorized: !allowUnauthorized,
keepAlive: true,
})
}
if (region !== undefined) {