Skip to content

Commit

Permalink
Update default connection timeout to be 30 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ince committed Aug 27, 2019
1 parent 504f320 commit bf10399
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/v1/index.js
Expand Up @@ -211,8 +211,8 @@ const logging = {
*
* // Specify socket connection timeout in milliseconds. Numeric values are expected. Negative and zero values
* // result in no timeout being applied. Connection establishment will be then bound by the timeout configured
* // on the operating system level. Default value is 5000, which is 5 seconds.
* connectionTimeout: 5000, // 5 seconds
* // on the operating system level. Default value is 30000, which is 30 seconds.
* connectionTimeout: 30000, // 30 seconds
*
* // Make this driver always return native JavaScript numbers for integer values, instead of the
* // dedicated {@link Integer} class. Values that do not fit in native number bit range will be represented as
Expand Down
2 changes: 1 addition & 1 deletion src/v1/internal/channel-config.js
Expand Up @@ -20,7 +20,7 @@
import { newError, SERVICE_UNAVAILABLE } from '../error'
import { ENCRYPTION_OFF, ENCRYPTION_ON } from './util'

const DEFAULT_CONNECTION_TIMEOUT_MILLIS = 5000 // 5 seconds by default
const DEFAULT_CONNECTION_TIMEOUT_MILLIS = 30000 // 30 seconds by default

const ALLOWED_VALUES_ENCRYPTED = [
null,
Expand Down
2 changes: 1 addition & 1 deletion test/internal/channel-config.test.js
Expand Up @@ -109,7 +109,7 @@ describe('ChannelConfig', () => {
it('should have connection timeout by default', () => {
const config = new ChannelConfig(null, {}, '')

expect(config.connectionTimeout).toEqual(5000)
expect(config.connectionTimeout).toEqual(30000)
})

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

0 comments on commit bf10399

Please sign in to comment.