nfs: work around assertion failure on exception during program init

Closes #477
This commit is contained in:
Max Kellermann 2019-02-15 18:33:58 +01:00
parent f70eb63879
commit 281461f0f0
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ NfsManager::Compare::operator()(const ManagedConnection &a,
NfsManager::~NfsManager() noexcept
{
assert(GetEventLoop().IsInside());
assert(!GetEventLoop().IsAlive() || GetEventLoop().IsInside());
CollectGarbage();
@ -103,7 +103,7 @@ NfsManager::GetConnection(const char *server, const char *export_name) noexcept
void
NfsManager::CollectGarbage() noexcept
{
assert(GetEventLoop().IsInside());
assert(!GetEventLoop().IsAlive() || GetEventLoop().IsInside());
garbage.clear_and_dispose(DeleteDisposer());
}

View File

@ -192,7 +192,7 @@ private:
}
void Disconnect() noexcept {
assert(GetEventLoop().IsInside());
assert(!GetEventLoop().IsAlive() || GetEventLoop().IsInside());
switch (state) {
case State::INITIAL: