diff --git a/raft/fsm.hh b/raft/fsm.hh index ba222dbcf3..191f2d9f74 100644 --- a/raft/fsm.hh +++ b/raft/fsm.hh @@ -386,7 +386,8 @@ void fsm::step(server_id from, Message&& msg) { logger.trace("{} [term: {}] received a message with higher term from {} [term: {}]", _my_id, _current_term, from, msg.current_term); - if constexpr (std::is_same_v) { + if constexpr (std::is_same_v || + std::is_same_v) { leader = from; } else { if constexpr (std::is_same_v) {