mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd:Ⓜ️🪝:base: Document assertions; relax assertion.
This commit is contained in:
parent
da695998ff
commit
81db366a78
1 changed files with 13 additions and 2 deletions
15
ircd/m.cc
15
ircd/m.cc
|
@ -3182,10 +3182,21 @@ noexcept
|
|||
if(!registered)
|
||||
return;
|
||||
|
||||
auto *const site(find_site());
|
||||
auto *const site
|
||||
{
|
||||
find_site()
|
||||
};
|
||||
|
||||
// should be non-null if !registered
|
||||
assert(site != nullptr);
|
||||
assert(site->calling == 0);
|
||||
|
||||
// if someone is calling and inside this hook we shouldn't be destructing
|
||||
assert(calling == 0);
|
||||
|
||||
// if someone is calling the hook::site but inside some other hook, we can
|
||||
// still remove this hook from the site.
|
||||
//assert(site->calling == 0);
|
||||
|
||||
site->del(*this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue