File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -152,14 +152,13 @@ const _getRedisOptionsTuple = () => {
152152const _createClientBase = ( clientName ) => {
153153 try {
154154 const [ isCluster , redisClientOptions ] = _getRedisOptionsTuple ( ) ;
155- if ( isCluster ) {
156- return redis . createCluster ( {
157- rootNodes : [ redisClientOptions ] , // NOTE: assume this ignores everything but socket/url
158- // https://github.com/redis/node-redis/issues/1782
159- defaults : redisClientOptions , // NOTE: assume this ignores socket/url
160- } ) ;
161- }
162- return redis . createClient ( redisClientOptions ) ;
155+ return isCluster
156+ ? redis . createCluster ( {
157+ rootNodes : [ redisClientOptions ] , // NOTE: assume this ignores everything but socket/url
158+ // https://github.com/redis/node-redis/issues/1782
159+ defaults : redisClientOptions , // NOTE: assume this ignores socket/url
160+ } )
161+ : redis . createClient ( redisClientOptions ) ;
163162 } catch ( err ) {
164163 throw new VError (
165164 { name : VERROR_CLUSTER_NAME , cause : err , info : { clientName } } ,
You can’t perform that action at this time.
0 commit comments