~ne02ptzero/libfloat

186a9d27fd0c1dad7ff722c2d159aa4aadead9e7 — Louis Solofrizzo a month ago 8250cee work/louis/replication_fix
log: Fix spamming heartbeats with entries when idle

Patch: https://lists.sr.ht/~ne02ptzero/libfloat/patches/24032

Signed-off-by: Louis Solofrizzo <lsolofrizzo@scaleway.com>
Acked-by: Michael Bonfils <mbonfils@scaleway.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M log.c
M log.c => log.c +1 -1
@@ 577,7 577,7 @@ void libfloat_append_entries_response(libfloat_ctx_t *ctx, libfloat_rpc_append_e

    /* Set the next index to sent to the node */
    node->last_update = ctx->time(NULL);
    if (node->next_log_to_send < resp->current_index)
    if (node->next_log_to_send <= resp->current_index)
    {
        node->next_log_to_send = resp->current_index + 1;
        node->replicated_log = resp->current_index;