Skip to content

Commit

Permalink
[CLIENT-1827] IdleTimeout new default 0 may be missing tend thread re…
Browse files Browse the repository at this point in the history
…aping
  • Loading branch information
khaf committed Sep 16, 2022
1 parent 1c93223 commit e1fd888
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ func NewCluster(policy *ClientPolicy, hosts []*Host) (*Cluster, Error) {
clientPolicy.RackIds = append(clientPolicy.RackIds, clientPolicy.RackId)
}

// Set a default Idle Timeout for the connection
if clientPolicy.IdleTimeout <= 0 {
clientPolicy.IdleTimeout = 55 * time.Second
}

newCluster := &Cluster{
clientPolicy: clientPolicy,
infoPolicy: InfoPolicy{Timeout: policy.Timeout},
Expand Down

0 comments on commit e1fd888

Please sign in to comment.