mirror of
https://github.com/fluencelabs/redis
synced 2025-04-30 21:12:13 +00:00
Always exit if connection fails.
This avoids unnecessary core dumps. Fixes antirez/redis#894
This commit is contained in:
parent
aadcda9977
commit
a8f9cec16a
@ -1288,19 +1288,19 @@ int main(int argc, char **argv) {
|
||||
|
||||
/* Latency mode */
|
||||
if (config.latency_mode) {
|
||||
cliConnect(0);
|
||||
if (cliConnect(0) == REDIS_ERR) exit(1);
|
||||
latencyMode();
|
||||
}
|
||||
|
||||
/* Slave mode */
|
||||
if (config.slave_mode) {
|
||||
cliConnect(0);
|
||||
if (cliConnect(0) == REDIS_ERR) exit(1);
|
||||
slaveMode();
|
||||
}
|
||||
|
||||
/* Get RDB mode. */
|
||||
if (config.getrdb_mode) {
|
||||
cliConnect(0);
|
||||
if (cliConnect(0) == REDIS_ERR) exit(1);
|
||||
getRDB();
|
||||
}
|
||||
|
||||
@ -1312,7 +1312,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
/* Find big keys */
|
||||
if (config.bigkeys) {
|
||||
cliConnect(0);
|
||||
if (cliConnect(0) == REDIS_ERR) exit(1);
|
||||
findBigKeys();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user