mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:55:09 +00:00
LibCore: Only deliver Read/Write events to listening notifiers
If a notifier has disabled read/write notifications via its event mask, we should not spam it with events, even if they have a hook callback.
This commit is contained in:
parent
f27e5ac68d
commit
e5933ec739
1 changed files with 2 additions and 2 deletions
|
@ -519,11 +519,11 @@ try_select_again:;
|
|||
|
||||
for (auto& notifier : *s_notifiers) {
|
||||
if (FD_ISSET(notifier->fd(), &rfds)) {
|
||||
if (notifier->on_ready_to_read)
|
||||
if (notifier->event_mask() & Notifier::Event::Read)
|
||||
post_event(*notifier, make<NotifierReadEvent>(notifier->fd()));
|
||||
}
|
||||
if (FD_ISSET(notifier->fd(), &wfds)) {
|
||||
if (notifier->on_ready_to_write)
|
||||
if (notifier->event_mask() & Notifier::Event::Write)
|
||||
post_event(*notifier, make<NotifierWriteEvent>(notifier->fd()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue