diff --git a/src/redis-cli.c b/src/redis-cli.c index 3f51c71393..052c0a6d5a 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -837,7 +837,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);