Fix default value for keepAliveMsecs, to be iso-functional with elastic-transport-js (#141234)

This commit is contained in:
Gerard Soldevila 2022-09-21 17:04:41 +02:00 committed by GitHub
parent 0b38c410dd
commit 1186e35dbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -51,7 +51,7 @@ describe('AgentManager', () => {
expect(HttpAgent).toBeCalledTimes(1);
expect(HttpAgent).toBeCalledWith({
keepAlive: true,
keepAliveMsecs: 50000,
keepAliveMsecs: 1000,
maxFreeSockets: 256,
maxSockets: 256,
scheduling: 'lifo',
@ -68,7 +68,7 @@ describe('AgentManager', () => {
expect(HttpAgent).toBeCalledTimes(1);
expect(HttpAgent).toBeCalledWith({
keepAlive: true,
keepAliveMsecs: 50000,
keepAliveMsecs: 1000,
maxFreeSockets: 32,
maxSockets: 1024,
scheduling: 'fifo',

View file

@ -13,7 +13,7 @@ import { ConnectionOptions, HttpAgentOptions } from '@elastic/elasticsearch';
const HTTPS = 'https:';
const DEFAULT_CONFIG: HttpAgentOptions = {
keepAlive: true,
keepAliveMsecs: 50000,
keepAliveMsecs: 1000,
maxSockets: 256,
maxFreeSockets: 256,
scheduling: 'lifo',