提交 f72b934d 编写于 作者: A antirez

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

上级 1807985b
......@@ -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).
* 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.
......
......@@ -4648,7 +4648,7 @@ static void infoCommand(redisClient *c) {
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++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册