Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Always exit if connection fails. #895

Merged
merged 1 commit into from

2 participants

@badboy

This avoids unnecessary core dumps. Fixes antirez/redis#894

@badboy badboy Always exit if connection fails.
This avoids unnecessary core dumps. Fixes antirez/redis#894
59046a7
@antirez antirez merged commit 74f1373 into antirez:unstable
@antirez
Owner

Thanks, merged.

@badboy badboy deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 18, 2013
  1. @badboy

    Always exit if connection fails.

    badboy authored
    This avoids unnecessary core dumps. Fixes antirez/redis#894
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/redis-cli.c
View
8 src/redis-cli.c
@@ -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();
}
Something went wrong with that request. Please try again.