diff --git a/src/io/rsm/raft.hpp b/src/io/rsm/raft.hpp index a1814b77a..eccbf031b 100644 --- a/src/io/rsm/raft.hpp +++ b/src/io/rsm/raft.hpp @@ -581,7 +581,7 @@ class Raft { const Time now = io_.Now(); const Duration broadcast_timeout = RandomTimeout(kMinimumBroadcastTimeout, kMaximumBroadcastTimeout); - if (now - leader.last_broadcast > broadcast_timeout) { + if (now > leader.last_broadcast + broadcast_timeout) { BroadcastAppendEntries(leader.followers); leader.last_broadcast = now; }