Commit 281461f0 authored by Max Kellermann's avatar Max Kellermann

nfs: work around assertion failure on exception during program init

Closes #477
parent f70eb638
......@@ -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());
}
......
......@@ -192,7 +192,7 @@ private:
}
void Disconnect() noexcept {
assert(GetEventLoop().IsInside());
assert(!GetEventLoop().IsAlive() || GetEventLoop().IsInside());
switch (state) {
case State::INITIAL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment