]> git.saurik.com Git - redis.git/commitdiff
Fixed Issue 76 (redis-server crashes when it can't connect to MASTER and client...
authorantirez <antirez@gmail.com>
Thu, 29 Oct 2009 10:30:43 +0000 (11:30 +0100)
committerantirez <antirez@gmail.com>
Thu, 29 Oct 2009 10:30:43 +0000 (11:30 +0100)
TODO
redis.c

diff --git a/TODO b/TODO
index 07703f4cfb0274ae13cec2499c71713f6b4c25cc..941e667576d692e1aa6e711976d2a8e28b9f18a9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,6 +10,7 @@ VERSION 1.1 TODO
 VERSION 1.2 TODO
 
 * Basic Redis-cluster (at least all the features of the Ruby client distribute implementation + ability to set every key in M nodes).
 VERSION 1.2 TODO
 
 * Basic Redis-cluster (at least all the features of the Ruby client distribute implementation + ability to set every key in M nodes).
+* Append mode log
 * Hashes (HSET, HGET, HEXISTS, HLEN, ...).
 * An utility able to export an .rdb file into a text-only JSON dump, we can't live anymore without such a tool. Probably an extension to redis-cli.
 
 * Hashes (HSET, HGET, HEXISTS, HLEN, ...).
 * An utility able to export an .rdb file into a text-only JSON dump, we can't live anymore without such a tool. Probably an extension to redis-cli.
 
diff --git a/redis.c b/redis.c
index 691996e81be524262e53fa5678be1d0fc9ee1661..16f2e2e7203ec412fcbb3030c7f3f8ef48674402 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -4648,7 +4648,7 @@ static void infoCommand(redisClient *c) {
             server.masterport,
             (server.replstate == REDIS_REPL_CONNECTED) ?
                 "up" : "down",
             server.masterport,
             (server.replstate == REDIS_REPL_CONNECTED) ?
                 "up" : "down",
-            (int)(time(NULL)-server.master->lastinteraction)
+            server.master ? ((int)(time(NULL)-server.master->lastinteraction)) : -1
         );
     }
     for (j = 0; j < server.dbnum; j++) {
         );
     }
     for (j = 0; j < server.dbnum; j++) {