diff options
author | yancz2000 <yancz2000@163.com> | 2022-10-09 17:17:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-09 12:17:36 +0300 |
commit | fe0550a4a64cb358ca3330784fa0ea18e7aecc2e (patch) | |
tree | 1a88447ba171e9cd2bfa2326b5e969b0009b26ba /src | |
parent | 35b3fbd90c2ad2c503c9e3d28bfbffff13099925 (diff) | |
download | redis-fe0550a4a64cb358ca3330784fa0ea18e7aecc2e.tar.gz |
Fix redis-benchmark hang when it fails to connect to redis (#11366)
Forgot to start redis-server when testing performance.
When opening the benchmark for testing, it will always be stuck,
and the process cpu will reach 100%.
Diffstat (limited to 'src')
-rw-r--r-- | src/redis-benchmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 489a6b3a3..f66e82ae8 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -320,7 +320,7 @@ static redisConfig *getRedisConfig(const char *ip, int port, c = getRedisContext(ip, port, hostsocket); if (c == NULL) { freeRedisConfig(cfg); - return NULL; + exit(1); } redisAppendCommand(c, "CONFIG GET %s", "save"); redisAppendCommand(c, "CONFIG GET %s", "appendonly"); |