Github user oknet commented on the issue:
https://github.com/apache/trafficserver/pull/947
comments for codes:
```
if (get_ev_events(pd, x) & (EVENTIO_READ | EVENTIO_ERROR)) {
// ** set read.triggered if a epoll event of net has EVENTIO_READ
or EVENTIO_ERROR bit set.
vc->read.triggered = 1;
// ** and put vc in read_ready_list
if (!read_ready_list.in(vc)) {
read_ready_list.enqueue(vc);
} else if (get_ev_events(pd, x) & EVENTIO_ERROR) {
// ** output an error message if a netvc already in ready_list
got EVENTIO_ERROR.
// check for unhandled epoll events that should be handled
Debug("iocore_net_main", "Unhandled epoll event on read: 0x%04x
read.enabled=%d closed=%d read.netready_queue=%d",
get_ev_events(pd, x), vc->read.enabled, vc->closed,
read_ready_list.in(vc));
}
}
```
The netvc always put in read_ready_list if it has EVENTIO_READ or
EVENTIO_ERROR.
```
#if defined(USE_EDGE_TRIGGER)
// UnixNetVConnection *
// ** for each netvc in read_ready_list
while ((vc = read_ready_list.dequeue())) {
if (vc->closed) // ** if the netvc mark closed
close_UnixNetVConnection(vc, trigger_event->ethread);
else if (vc->read.enabled && vc->read.triggered) //** if the netvc is
enabled and triggered
vc->net_read_io(this, trigger_event->ethread);
else if (!vc->read.enabled) { //** if the netvc is not enabled
read_ready_list.remove(vc);
#if defined(solaris)
if (vc->read.triggered && vc->write.enabled) {
vc->ep.modify(-EVENTIO_READ);
vc->ep.refresh(EVENTIO_WRITE);
vc->writeReschedule(this);
}
#endif
}
}
```
for your case, read.enabled is 0
```
else if (!vc->read.enabled) { // if the netvc is not enabled
read_ready_list.remove(vc);
```
The vc is removed from read_ready_list.
The below is my suggest:
```
if (get_ev_events(pd, x) & (EVENTIO_READ | EVENTIO_ERROR)) {
vc->read.triggered = 1;
+ if (get_ev_events(pd, x) & EVENTIO_ERROR) {
+ vc->read.error = 1;
+ }
if (!read_ready_list.in(vc)) {
read_ready_list.enqueue(vc);
} else if (get_ev_events(pd, x) & EVENTIO_ERROR) {
```
and
```
else if (vc->read.enabled && vc->read.triggered) //** if the netvc is
enabled and triggered
vc->net_read_io(this, trigger_event->ethread);
+ else if (vc->read.error) {
+ int err = 0, errlen = sizeof(int);
+ if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &errlen) == -1) {
+ err = errno;
+ }
+ if (err != EAGAIN && err != EINTR)
+ vc->readSignalError(this, err);
+ }
else if (!vc->read.enabled) { //** if the netvc is not enabled
read_ready_list.remove(vc);
#if defined(solaris)
if (vc->read.triggered && vc->write.enabled) {
vc->ep.modify(-EVENTIO_READ);
vc->ep.refresh(EVENTIO_WRITE);
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---