From b07f8d633e45d629cb19a5a8802da767168b08d1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 25 Feb 2020 13:31:11 -0800 Subject: [PATCH] ircd::m::homeserver: Move module unload to same unit as load. --- matrix/homeserver.cc | 3 +++ matrix/matrix.cc | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix/homeserver.cc b/matrix/homeserver.cc index 140ebd82e..71b63d638 100644 --- a/matrix/homeserver.cc +++ b/matrix/homeserver.cc @@ -267,6 +267,9 @@ noexcept signoff(*this); vm.reset(); + if(primary == this) + mods::imports.erase("net_dns_cache"s); + while(!modules.empty()) modules.pop_back(); } diff --git a/matrix/matrix.cc b/matrix/matrix.cc index 25b2f981c..a6322fef8 100644 --- a/matrix/matrix.cc +++ b/matrix/matrix.cc @@ -226,8 +226,6 @@ noexcept try _fetch.reset(nullptr); - mods::imports.erase("net_dns_cache"s); - //TODO: remove this for non-interfering shutdown //server::interrupt_all(); //client::terminate_all();