Github user oknet commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/947#discussion_r78126610 --- Diff: iocore/net/UnixNetVConnection.cc --- @@ -270,6 +270,21 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) close_UnixNetVConnection(vc, thread); return; } + + if (vc->read.error) { + int err = 0, errlen = sizeof(int); + if (getsockopt(vc->con.fd, SOL_SOCKET, SO_ERROR, &err, (socklen_t *)&errlen) == -1) { + err = errno; + } + // if it is a non-temporary error, we should die appropriately + if (err != EAGAIN && err != EINTR) { + read_signal_error(nh, vc, err); + return; + } else { + vc->read.error = 0; --- End diff -- @jpeach the error clear here. How to handle the EVENTIO_ERROR: 1. Set error to 1 if NetHandler get EVENTIO_ERROR on NetVC 2. Call net_read_io or write_to_net_io for the NetVC that has triggered and enabled or only has error). 3. In the io function, we get lock first then check the vio error status. 4. Try to get socket error by getsockopt if error set 5. clear vio error status if non-fatal error 6. call read|write_signal_error if fatal error and the NetVC should be closed.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---