mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibCore: Awaken read notifiers when we receive POLLHUP events
POLLHUP is set when the remote end of the monitored fd is closed. There may still be some buffered data to read from the socket, however. Some systems do not set POLLIN in these cases. So we should just always try to read from fds when we receive this event.
This commit is contained in:
parent
f46b721c57
commit
a9f7579738
Notes:
github-actions[bot]
2025-07-07 21:54:15 +00:00
Author: https://github.com/ADKaster
Commit: a9f7579738
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5331
1 changed files with 3 additions and 1 deletions
|
@ -420,10 +420,12 @@ try_select_again:
|
|||
if (has_flag(revents, POLLOUT))
|
||||
type |= NotificationType::Write;
|
||||
if (has_flag(revents, POLLHUP))
|
||||
type |= NotificationType::HangUp;
|
||||
type |= NotificationType::Read | NotificationType::HangUp;
|
||||
if (has_flag(revents, POLLERR))
|
||||
type |= NotificationType::Error;
|
||||
|
||||
type &= notifier.type();
|
||||
|
||||
if (type != NotificationType::None)
|
||||
ThreadEventQueue::current().post_event(notifier, make<NotifierActivationEvent>(notifier.fd(), type));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue