diff --git a/cluster.go b/cluster.go index 66206ea9b..e223c0ab0 100644 --- a/cluster.go +++ b/cluster.go @@ -117,7 +117,7 @@ type ClusterConfig struct { // Default reconnection policy to use for reconnecting before trying to mark host as down. ReconnectionPolicy ReconnectionPolicy - // The keepalive period to use, enabled if > 0 (default: 0) + // The keepalive period to use, enabled if > 0 (default: 15 seconds) // SocketKeepalive is used to set up the default dialer and is ignored if Dialer or HostDialer is provided. SocketKeepalive time.Duration @@ -290,6 +290,7 @@ func NewCluster(hosts ...string) *ClusterConfig { ReconnectInterval: 60 * time.Second, ConvictionPolicy: &SimpleConvictionPolicy{}, ReconnectionPolicy: &ConstantReconnectionPolicy{MaxRetries: 3, Interval: 1 * time.Second}, + SocketKeepalive: 15 * time.Second, WriteCoalesceWaitTime: 200 * time.Microsecond, }