diff --git a/matrix/homeserver.cc b/matrix/homeserver.cc index b73eb9cc0..cdb97c7b0 100644 --- a/matrix/homeserver.cc +++ b/matrix/homeserver.cc @@ -277,6 +277,8 @@ noexcept { if(primary == this) { + m::init::backfill::fini(); + //TODO: remove this for non-interfering shutdown server::init::interrupt(); client::terminate_all(); @@ -284,14 +286,11 @@ noexcept client::close_all(); client::wait_all(); server::init::wait(); - } - if(primary == this) - { - m::init::backfill::fini(); m::sync::pool.join(); } + signoff(*this); if(primary == this) mods::imports.erase("net_dns_cache"s);