File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -650,7 +650,7 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
650
650
c .processPipeline = c .defaultProcessPipeline
651
651
c .processTxPipeline = c .defaultProcessTxPipeline
652
652
653
- c .cmdable . setProcessor ( c . Process )
653
+ c .init ( )
654
654
655
655
_ , _ = c .state .Reload ()
656
656
if opt .IdleCheckFrequency > 0 {
@@ -660,6 +660,10 @@ func NewClusterClient(opt *ClusterOptions) *ClusterClient {
660
660
return c
661
661
}
662
662
663
+ func (c * ClusterClient ) init () {
664
+ c .cmdable .setProcessor (c .Process )
665
+ }
666
+
663
667
func (c * ClusterClient ) Context () context.Context {
664
668
if c .ctx != nil {
665
669
return c .ctx
@@ -678,6 +682,7 @@ func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient {
678
682
679
683
func (c * ClusterClient ) copy () * ClusterClient {
680
684
cp := * c
685
+ cp .init ()
681
686
return & cp
682
687
}
683
688
You can’t perform that action at this time.
0 commit comments