mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
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%.
This commit is contained in:
parent
35b3fbd90c
commit
fe0550a4a6
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user