Allow hangup event also when EPOLLRDHUP is not available.
When generating a fake hangup event, EPOLLRDHUP is used if available, otherwise EPOLLHUP. process_pollq(int) does the same thing both in the case of EPOLLRDHUP and EPOLLHUP, so it seems this should work.
This commit is contained in:
@ -1634,7 +1634,11 @@ poll_fake_write_event(DCB *dcb)
|
|||||||
void
|
void
|
||||||
poll_fake_hangup_event(DCB *dcb)
|
poll_fake_hangup_event(DCB *dcb)
|
||||||
{
|
{
|
||||||
|
#ifdef EPOLLRDHUP
|
||||||
uint32_t ev = EPOLLRDHUP;
|
uint32_t ev = EPOLLRDHUP;
|
||||||
|
#else
|
||||||
|
uint32_t ev = EPOLLHUP;
|
||||||
|
#endif
|
||||||
|
|
||||||
spinlock_acquire(&pollqlock);
|
spinlock_acquire(&pollqlock);
|
||||||
if (DCB_POLL_BUSY(dcb))
|
if (DCB_POLL_BUSY(dcb))
|
||||||
|
|||||||
Reference in New Issue
Block a user