]> git.saurik.com Git - redis.git/commitdiff
Merge pull request #593 from steevel/unstable
authorSalvatore Sanfilippo <antirez@gmail.com>
Sat, 21 Jul 2012 18:12:35 +0000 (11:12 -0700)
committerSalvatore Sanfilippo <antirez@gmail.com>
Sat, 21 Jul 2012 18:12:35 +0000 (11:12 -0700)
Check that we have connection before enabling pipe mode

src/redis-cli.c

index 97caf5be8103e582cf35661bfe62c48a7eba1d06..8d20d1cd502ebfd7c53793914a3a9a5477c9db8a 100644 (file)
@@ -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();
     }