From e9828cb6f7a13caf57ad6caf861812b687c8339c Mon Sep 17 00:00:00 2001 From: Steeve Lennmark Date: Sun, 15 Jul 2012 14:35:02 +0200 Subject: [PATCH] Check that we have connection before enabling pipe mode --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 97caf5be8..8d20d1cd5 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(); } -- GitLab