Commit f72b934d authored by antirez's avatar antirez
Browse files

Fixed Issue 76 (redis-server crashes when it can't connect to MASTER and client connects to SLAVE)

parent 1807985b
...@@ -10,6 +10,7 @@ VERSION 1.1 TODO ...@@ -10,6 +10,7 @@ VERSION 1.1 TODO
VERSION 1.2 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). * 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, ...). * 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. * 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.
......
...@@ -4648,7 +4648,7 @@ static void infoCommand(redisClient *c) { ...@@ -4648,7 +4648,7 @@ static void infoCommand(redisClient *c) {
server.masterport, server.masterport,
(server.replstate == REDIS_REPL_CONNECTED) ? (server.replstate == REDIS_REPL_CONNECTED) ?
"up" : "down", "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++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment