0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 10:08:56 +02:00

ircd::mods: Add another debug message for static unload process.

This commit is contained in:
Jason Volk 2019-08-27 20:11:56 -07:00
parent 4e5d67dfe9
commit d1fd290ae7

View file

@ -108,17 +108,30 @@ ircd::mods::unload(mod &mod)
log::debug
{
log, "Attempting static unload for '%s' @ `%s' children:%zu",
log, "Static unload for '%s' @ `%s' children:%zu loaded:%zu unloading:%zu attempting...",
mod.name(),
mod.location(),
children.size(),
mod.loaded.size(),
std::distance(begin(mod.unloading), end(mod.unloading)),
};
mapi::static_destruction = false;
mod.handle.unload();
log::debug
{
log, "Static unload for '%s' complete=%b loaded:%zu unloading:%zu",
mod.name(),
mapi::static_destruction,
mod.loaded.size(),
std::distance(begin(mod.unloading), end(mod.unloading)),
};
assert(!mod.handle.is_loaded());
mod.loaded.erase(mod.name());
mod.unloading.remove(&mod);
if(!mapi::static_destruction)
{
handle_stuck(mod);