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:
parent
f030b22bec
commit
bbbbf5f4bd
@ -103,7 +103,7 @@ MultiSocketMonitor::Prepare() noexcept
|
|||||||
constexpr Event::Duration ready_timeout =
|
constexpr Event::Duration ready_timeout =
|
||||||
std::chrono::milliseconds(1);
|
std::chrono::milliseconds(1);
|
||||||
if (timeout < timeout.zero() || timeout > ready_timeout)
|
if (timeout < timeout.zero() || timeout > ready_timeout)
|
||||||
timeout = ready_timeout;
|
timeout = always_ready_timeout = ready_timeout;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -120,6 +120,11 @@ MultiSocketMonitor::OnIdle() noexcept
|
|||||||
if (ready) {
|
if (ready) {
|
||||||
ready = false;
|
ready = false;
|
||||||
DispatchSockets();
|
DispatchSockets();
|
||||||
|
|
||||||
|
#ifdef USE_EPOLL
|
||||||
|
if (!refresh && !always_ready_fds.empty())
|
||||||
|
timeout_event.Schedule(always_ready_timeout);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
@ -109,6 +109,8 @@ class MultiSocketMonitor
|
|||||||
* epoll (epoll_ctl() returns -EPERM).
|
* epoll (epoll_ctl() returns -EPERM).
|
||||||
*/
|
*/
|
||||||
std::forward_list<AlwaysReady> always_ready_fds;
|
std::forward_list<AlwaysReady> always_ready_fds;
|
||||||
|
|
||||||
|
Event::Duration always_ready_timeout;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user