Fixed issue #435 and at the same time introduced explicit ping in the master-slave channel that will detect a blocked master or a broken even if apparently connected TCP link.

This commit is contained in:
antirez
2011-01-20 13:18:23 +01:00
parent f25d5b5c9c
commit 89a1433e69
3 changed files with 48 additions and 4 deletions

View File

@ -516,7 +516,7 @@ void updateLRUClock(void) {
}
int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
int j, loops = server.cronloops++;
int j, loops = server.cronloops;
REDIS_NOTUSED(eventLoop);
REDIS_NOTUSED(id);
REDIS_NOTUSED(clientData);
@ -646,6 +646,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
* to detect transfer failures. */
if (!(loops % 10)) replicationCron();
server.cronloops++;
return 100;
}