Github user jpeach commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/947#discussion_r78127223
--- 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 that's my point. You (probably) had the error but dropped it and maybe
now you get EBADF instead. Clearly this is not a likely scenario ...
---
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.
---