]> git.saurik.com Git - redis.git/commit - src/sentinel.c
Prevent a spurious +sdown event on switch.
authorantirez <antirez@gmail.com>
Tue, 24 Jul 2012 16:46:04 +0000 (18:46 +0200)
committerantirez <antirez@gmail.com>
Tue, 24 Jul 2012 16:46:04 +0000 (18:46 +0200)
commita23a5b6c7de0f4fdb22b0d06b06e038004d48546
treea2444d6aebe1ef1e36aaa396782c037316addb8e
parentd918e6f127f60efd7b9fd23ba3413eb441240e0f
Prevent a spurious +sdown event on switch.

When we reset the master we should start with clean timestamps for ping
replies otherwise we'll detect a spurious +sdown event, because on
+master-switch event the previous master instance was probably in +sdown
condition. Since we updated the address we should count time from
scratch again.

Also this commit makes sure to explicitly reset the count of pending
commands, now we can do this because of the new way the hiredis link
is closed.
src/sentinel.c