Github user oknet commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/947#discussion_r78128086
  
    --- 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 --
    
    Yes, it  is not a likely scenario.
    This case is only a EPOLLERR occur on a socket fd and without EPOLLIN or 
EPOLLOUT.
    
    The EPOLLERR is only indictor an error occur on a socket fd.
    We can get the errno by getsockopt() for the socket fd directly before 
perform read() or 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to