mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 23:58:12 +00:00
LibGUI: Pass the computed max_fd(+1) to select().
This commit is contained in:
parent
1d758fd2ce
commit
96352ab735
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ void GEventLoop::wait_for_event()
|
||||||
struct timeval timeout = { 0, 0 };
|
struct timeval timeout = { 0, 0 };
|
||||||
if (!m_timers.is_empty())
|
if (!m_timers.is_empty())
|
||||||
get_next_timer_expiration(timeout);
|
get_next_timer_expiration(timeout);
|
||||||
int rc = select(m_event_fd + 1, &rfds, &wfds, nullptr, (m_queued_events.is_empty() && m_timers.is_empty()) ? nullptr : &timeout);
|
int rc = select(max_fd + 1, &rfds, &wfds, nullptr, (m_queued_events.is_empty() && m_timers.is_empty()) ? nullptr : &timeout);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue