F #2147: Reset election timeout on turning into follower

(cherry picked from commit 49ae026876)
This commit is contained in:
Ruben S. Montero committed 2018-06-02 14:19:10 +02:00
1 parent 53fe56a991
commit 2748383b1a
1 file changed
+6
+6
View File
@@ -562,6 +562,12 @@ void RaftManager::follower(unsigned int _term)
requests.clear();
//Reset heartbeat when turning into follower when a higher term is found:
// 1. On vote request
// 2. On heartbeat response
// 3. On log replicate request
clock_gettime(CLOCK_REALTIME, &last_heartbeat);
pthread_mutex_unlock(&mutex);
if ( nd.is_federation_master() )