Skip to content

Commit bf10399

Browse files
committed
Update default connection timeout to be 30 seconds
1 parent 504f320 commit bf10399

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/v1/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ const logging = {
211211
*
212212
* // Specify socket connection timeout in milliseconds. Numeric values are expected. Negative and zero values
213213
* // result in no timeout being applied. Connection establishment will be then bound by the timeout configured
214-
* // on the operating system level. Default value is 5000, which is 5 seconds.
215-
* connectionTimeout: 5000, // 5 seconds
214+
* // on the operating system level. Default value is 30000, which is 30 seconds.
215+
* connectionTimeout: 30000, // 30 seconds
216216
*
217217
* // Make this driver always return native JavaScript numbers for integer values, instead of the
218218
* // dedicated {@link Integer} class. Values that do not fit in native number bit range will be represented as

src/v1/internal/channel-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import { newError, SERVICE_UNAVAILABLE } from '../error'
2121
import { ENCRYPTION_OFF, ENCRYPTION_ON } from './util'
2222

23-
const DEFAULT_CONNECTION_TIMEOUT_MILLIS = 5000 // 5 seconds by default
23+
const DEFAULT_CONNECTION_TIMEOUT_MILLIS = 30000 // 30 seconds by default
2424

2525
const ALLOWED_VALUES_ENCRYPTED = [
2626
null,

test/internal/channel-config.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('ChannelConfig', () => {
109109
it('should have connection timeout by default', () => {
110110
const config = new ChannelConfig(null, {}, '')
111111

112-
expect(config.connectionTimeout).toEqual(5000)
112+
expect(config.connectionTimeout).toEqual(30000)
113113
})
114114

115115
it('should respect configured connection timeout', () => {

0 commit comments

Comments
 (0)