Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.4.1
-
None
-
2016-11
Description
When a service is shut down, it is removed from the polling system and set into a different state. On line 959 in poll.c the check whether the accept or read entry points is done is based on the state of the listener. When a service is shut down, the state of the listener is modified before the listener is removed from the poll queue.
/*<
|
* Set state to NOPOLLING and remove dcb from poll set.
|
*/
|
dcb->state = DCB_STATE_NOPOLLING;
|
 |
/**
|
* Only positive fds can be removed from epoll set.
|
* Cloned DCBs can have a state of DCB_STATE_POLLING but are not in
|
* the epoll set and do not have a valid file descriptor. Hence the
|
* only action for them is already done - the change of state to
|
* DCB_STATE_NOPOLLING.
|
*/
|
dcbfd = dcb->fd;
|
spinlock_release(&dcb->dcb_initlock);
|
if (dcbfd > 0)
|
{
|
rc = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, dcbfd, &ev);
|
This causes the listener DCB's read entry point to be called and the debug check for the protocol is the first to fail.