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/889e443ce51923704241d62daa65178c35dedbf9?ds=sidebyside 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(); }