diff --git a/src/StateFile.cxx b/src/StateFile.cxx index c7c730173..a3d4dd03e 100644 --- a/src/StateFile.cxx +++ b/src/StateFile.cxx @@ -148,7 +148,7 @@ try { void StateFile::CheckModified() noexcept { - if (!timer_event.IsActive() && IsModified()) + if (!timer_event.IsPending() && IsModified()) timer_event.Schedule(config.interval); } diff --git a/src/event/TimerEvent.hxx b/src/event/TimerEvent.hxx index 0fe775fac..1862f9f8a 100644 --- a/src/event/TimerEvent.hxx +++ b/src/event/TimerEvent.hxx @@ -59,7 +59,7 @@ public: return loop; } - bool IsActive() const noexcept { + bool IsPending() const noexcept { return is_linked(); } diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx index 3ab6813c6..f46e49e6a 100644 --- a/src/lib/nfs/Connection.cxx +++ b/src/lib/nfs/Connection.cxx @@ -395,7 +395,7 @@ NfsConnection::DestroyContext() noexcept #endif if (!mount_finished) { - assert(mount_timeout_event.IsActive()); + assert(mount_timeout_event.IsPending()); mount_timeout_event.Cancel(); } @@ -552,7 +552,7 @@ NfsConnection::MountCallback(int status, [[maybe_unused]] nfs_context *nfs, mount_finished = true; - assert(mount_timeout_event.IsActive() || in_destroy); + assert(mount_timeout_event.IsPending() || in_destroy); mount_timeout_event.Cancel(); if (status < 0) {