When the password is wrong, redis-benchmark should exit (#8855)

This commit is contained in:
Yang Bodong 2021-04-25 19:00:35 +08:00 committed by GitHub
parent 611959eee5
commit 8423b77f14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1782,8 +1782,10 @@ int main(int argc, const char **argv) {
} else {
config.redis_config =
getRedisConfig(config.hostip, config.hostport, config.hostsocket);
if (config.redis_config == NULL)
if (config.redis_config == NULL) {
fprintf(stderr, "WARN: could not fetch server CONFIG\n");
exit(1);
}
}
if (config.num_threads > 0) {
pthread_mutex_init(&(config.liveclients_mutex), NULL);