diff --git a/src/redis-cli.c b/src/redis-cli.c index 7e1fe3934..ff34f2b6a 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -844,7 +844,9 @@ static int cliConnect(int flags) { cliRefreshPrompt(); } - if (config.hostsocket == NULL) { + /* Do not use hostsocket when we got redirected in cluster mode */ + if (config.hostsocket == NULL || + (config.cluster_mode && config.cluster_reissue_command)) { context = redisConnect(config.hostip,config.hostport); } else { context = redisConnectUnix(config.hostsocket);