diff --git a/src/server.c b/src/server.c index ee4421920..78a28c617 100644 --- a/src/server.c +++ b/src/server.c @@ -191,11 +191,12 @@ void dqlite__close(struct dqlite_node *d) rv = sem_destroy(&d->handover_done); (void)rv; fsm__close(&d->raft_fsm); - // TODO assert rv of uv_loop_close after fixing cleanup logic related to - // the TODO above referencing the cleanup logic without running the - // node. See https://github.com/canonical/dqlite/issues/504. - uv_loop_close(&d->loop); + raft_uv_close(&d->raft_io); raftProxyClose(&d->raft_transport); + /* TODO assert rv of uv_loop_close after fixing cleanup logic related to + * the TODO above referencing the cleanup logic without running the + * node. See https://github.com/canonical/dqlite/issues/504. */ + uv_loop_close(&d->loop); registry__close(&d->registry); sqlite3_vfs_unregister(&d->vfs); VfsClose(&d->vfs);