diff options
author | Max Kellermann <max@musicpd.org> | 2019-02-15 18:33:58 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-02-15 18:33:58 +0100 |
commit | 281461f0f07b27253f39a96d1c576d5f410b5802 (patch) | |
tree | d751439034f3387e4448bbd07013849a6be3e529 /src | |
parent | f70eb638793daa6769fb3ddcdc11133e9aaa79ea (diff) |
nfs: work around assertion failure on exception during program init
Closes #477
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/nfs/Manager.cxx | 4 | ||||
-rw-r--r-- | src/storage/plugins/NfsStorage.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/nfs/Manager.cxx b/src/lib/nfs/Manager.cxx index a4ebcc2ae..9fc34813b 100644 --- a/src/lib/nfs/Manager.cxx +++ b/src/lib/nfs/Manager.cxx @@ -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()); } diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx index 346f9e6c2..5f9450497 100644 --- a/src/storage/plugins/NfsStorage.cxx +++ b/src/storage/plugins/NfsStorage.cxx @@ -192,7 +192,7 @@ private: } void Disconnect() noexcept { - assert(GetEventLoop().IsInside()); + assert(!GetEventLoop().IsAlive() || GetEventLoop().IsInside()); switch (state) { case State::INITIAL: |