LibCore: Allow listening for socket errors and hang-ups

This commit is contained in:
Dan Klishch
2024-02-01 21:51:36 -05:00
committed by Andrew Kaster
parent 6836091a21
commit 506707cc2b
2 changed files with 6 additions and 0 deletions

View File

@@ -267,6 +267,10 @@ try_select_again:
type |= NotificationType::Read;
if (has_flag(revents, POLLOUT))
type |= NotificationType::Write;
if (has_flag(revents, POLLHUP))
type |= 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));