I added this: ==================== @@ -1091,6 +1091,7 @@ raft_create(struct raft *raft) void raft_destroy(struct raft *raft) { + ev_timer_stop(loop(), &raft->timer); trigger_destroy(&raft->on_update); if (raft->worker != NULL) { raft_worker_wakeup(raft);