Signed-off-by: Louis Solofrizzo <lsolofrizzo@scaleway.com>
---
log.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/log.c b/log.c
index 51a8cc7..a9e55c3 100644
--- a/log.c+++ b/log.c
@@ -406,6 +406,12 @@ void libfloat_append_entries_receive(libfloat_ctx_t *ctx, libfloat_rpc_append_en
}
else
{
+ if (node == NULL)+ {+ /* This leader is unknown, let's not trigger an election for that */+ return;+ }+ /* Who are you and how are you in a position of leadership? */
DEBUG(ctx, "libfloat_append_entries_receive: Dropping AE term=%d remote_term=%d", ctx->persistent.term, req->term);
libfloat_election_start(ctx, .reason = "Dropping mismatch AE term");
--
2.38.1