Listen for only EPOLLIN events with listeners
The example in the epoll(7) manpage only sets the EPOLLIN event flag. Although it is not explicitly stated that only EPOLLIN events arrive for sockets that are listening, any other types of events should not be relevant for listeners.
This commit is contained in:
committed by
Markus Mäkelä
parent
4117dcf410
commit
159c8bb5d1
@ -3451,6 +3451,12 @@ int poll_add_dcb(DCB *dcb)
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* Listeners are always added in level triggered mode. This will cause
|
||||
* new events to be generated as long as there is at least one connection
|
||||
* to accept.
|
||||
*/
|
||||
events = EPOLLIN;
|
||||
ss_dassert(dcb->dcb_role == DCB_ROLE_SERVICE_LISTENER);
|
||||
new_state = DCB_STATE_LISTENING;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user