]> 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>
Thu, 27 Sep 2012 11:04:19 +0000 (13:04 +0200)
commitf8a19e32e2fffea00e61717d99ecebabafbbe852
tree261c202b379f8afcf76cbfa572e8034a87fd8114
parent7c39b55d4231f3933d79c690572200bb251f6a0f
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