@@ -43,6 +43,8 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
4343            'enable '  => false ,
4444            'name '  => null ,
4545            'seeds '  => [],
46+             'read_timeout '  => 0.0 ,
47+             'persistent '  => false ,
4648        ],
4749        'sentinel '  => [
4850            'enable '  => false ,
@@ -63,7 +65,7 @@ class RedisConnection extends BaseConnection implements ConnectionInterface
6365    public  function  __construct (ContainerInterface $ containerPool $ poolarray  $ config
6466    {
6567        parent ::__construct ($ container$ pool
66-         $ this config  = array_replace ($ this config , $ config
68+         $ this config  = array_replace_recursive ($ this config , $ config
6769
6870        $ this reconnect ();
6971    }
@@ -122,7 +124,7 @@ public function reconnect(): bool
122124            $ redissetOption ($ name$ value
123125        }
124126
125-         if  (isset ($ auth$ auth'' ) {
127+         if  ($ redis   instanceof  \Redis &&  isset ($ auth$ auth'' ) {
126128            $ redisauth ($ auth
127129        }
128130
@@ -164,9 +166,12 @@ protected function createRedisCluster()
164166        try  {
165167            $ seeds$ this config ['cluster ' ]['seeds ' ] ?? [];
166168            $ name$ this config ['cluster ' ]['name ' ] ?? null ;
169+             $ readTimeout$ this config ['cluster ' ]['read_timeout ' ] ?? 0.0 ;
170+             $ persistent$ this config ['cluster ' ]['persistent ' ] ?? false ;
167171            $ timeout$ this config ['timeout ' ] ?? null ;
172+             $ auth$ this config ['auth ' ] ?? null ;
168173
169-             $ redisnew  \RedisCluster ($ name$ seeds$ timeout
174+             $ redisnew  \RedisCluster ($ name$ seeds$ timeout,  $ readTimeout ,  $ persistent ,  $ auth 
170175        } catch  (\Throwable   $ e
171176            throw  new  ConnectionException ('Connection reconnect failed  '  . $ egetMessage ());
172177        }
0 commit comments