event/MultiSocketMonitor: reschedule epoll/EPERM workaround forever

Fixes a regression by commit 3558317dc9 which caused the ALSA null
plugin to cease to work because the workaround timer was never rescheduled.
This commit is contained in:
Max Kellermann 2024-07-25 20:16:07 +02:00
parent f030b22bec
commit bbbbf5f4bd
2 changed files with 8 additions and 1 deletions

View File

@ -103,7 +103,7 @@ MultiSocketMonitor::Prepare() noexcept
constexpr Event::Duration ready_timeout =
std::chrono::milliseconds(1);
if (timeout < timeout.zero() || timeout > ready_timeout)
timeout = ready_timeout;
timeout = always_ready_timeout = ready_timeout;
}
#endif
@ -120,6 +120,11 @@ MultiSocketMonitor::OnIdle() noexcept
if (ready) {
ready = false;
DispatchSockets();
#ifdef USE_EPOLL
if (!refresh && !always_ready_fds.empty())
timeout_event.Schedule(always_ready_timeout);
#endif
}
if (refresh) {

View File

@ -109,6 +109,8 @@ class MultiSocketMonitor
* epoll (epoll_ctl() returns -EPERM).
*/
std::forward_list<AlwaysReady> always_ready_fds;
Event::Duration always_ready_timeout;
#endif
protected: