From: Steeve Lennmark Date: Sun, 15 Jul 2012 12:35:02 +0000 (+0200) Subject: Check that we have connection before enabling pipe mode X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/e9828cb6f7a13caf57ad6caf861812b687c8339c Check that we have connection before enabling pipe mode --- diff --git a/src/redis-cli.c b/src/redis-cli.c index 97caf5be..8d20d1cd 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1233,7 +1233,7 @@ int main(int argc, char **argv) { /* Pipe mode */ if (config.pipe_mode) { - cliConnect(0); + if (cliConnect(0) == REDIS_ERR) exit(1); pipeMode(); }