diff --git a/bench_decode_test.go b/bench_decode_test.go index de53064f2..f07529f62 100644 --- a/bench_decode_test.go +++ b/bench_decode_test.go @@ -30,6 +30,7 @@ func NewClientStub(resp []byte) *ClientStub { Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { return stub.stubConn(initHello), nil }, + DisableClientSetInfo: true, }) return stub } @@ -45,6 +46,7 @@ func NewClusterClientStub(resp []byte) *ClientStub { Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { return stub.stubConn(initHello), nil }, + DisableClientSetInfo: true, ClusterSlots: func(_ context.Context) ([]ClusterSlot, error) { return []ClusterSlot{ { diff --git a/cluster.go b/cluster.go index 941838dd0..43f4a4dfe 100644 --- a/cluster.go +++ b/cluster.go @@ -83,7 +83,8 @@ type ClusterOptions struct { ConnMaxIdleTime time.Duration ConnMaxLifetime time.Duration - TLSConfig *tls.Config + TLSConfig *tls.Config + DisableClientSetInfo bool // Disable set-lib on connect. Default is false. } func (opt *ClusterOptions) init() { @@ -277,15 +278,15 @@ func (opt *ClusterOptions) clientOptions() *Options { ReadTimeout: opt.ReadTimeout, WriteTimeout: opt.WriteTimeout, - PoolFIFO: opt.PoolFIFO, - PoolSize: opt.PoolSize, - PoolTimeout: opt.PoolTimeout, - MinIdleConns: opt.MinIdleConns, - MaxIdleConns: opt.MaxIdleConns, - ConnMaxIdleTime: opt.ConnMaxIdleTime, - ConnMaxLifetime: opt.ConnMaxLifetime, - - TLSConfig: opt.TLSConfig, + PoolFIFO: opt.PoolFIFO, + PoolSize: opt.PoolSize, + PoolTimeout: opt.PoolTimeout, + MinIdleConns: opt.MinIdleConns, + MaxIdleConns: opt.MaxIdleConns, + ConnMaxIdleTime: opt.ConnMaxIdleTime, + ConnMaxLifetime: opt.ConnMaxLifetime, + DisableClientSetInfo: opt.DisableClientSetInfo, + TLSConfig: opt.TLSConfig, // If ClusterSlots is populated, then we probably have an artificial // cluster whose nodes are not in clustering mode (otherwise there isn't // much use for ClusterSlots config). This means we cannot execute the diff --git a/options.go b/options.go index 90e7bb578..86c7c9dc7 100644 --- a/options.go +++ b/options.go @@ -137,7 +137,7 @@ type Options struct { // Enables read only queries on slave/follower nodes. readOnly bool - // Disable set-lib during connect with name and version. Default is false. + // // Disable set-lib on connect. Default is false. DisableClientSetInfo bool }