Unverified Commit fe0550a4 authored by yancz2000's avatar yancz2000 Committed by GitHub
Browse files

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%.
parent 35b3fbd9
...@@ -320,7 +320,7 @@ static redisConfig *getRedisConfig(const char *ip, int port, ...@@ -320,7 +320,7 @@ static redisConfig *getRedisConfig(const char *ip, int port,
c = getRedisContext(ip, port, hostsocket); c = getRedisContext(ip, port, hostsocket);
if (c == NULL) { if (c == NULL) {
freeRedisConfig(cfg); freeRedisConfig(cfg);
return NULL; exit(1);
} }
redisAppendCommand(c, "CONFIG GET %s", "save"); redisAppendCommand(c, "CONFIG GET %s", "save");
redisAppendCommand(c, "CONFIG GET %s", "appendonly"); redisAppendCommand(c, "CONFIG GET %s", "appendonly");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment