Skip to content

Commit

Permalink
[Server] Avoid misleading error message when client does a multiple h…
Browse files Browse the repository at this point in the history
…angup.
  • Loading branch information
abh3 committed Jun 27, 2020
1 parent 925fae5 commit c8f3616
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Xrd/XrdPollE.icc
Expand Up @@ -199,9 +199,12 @@ void XrdPollE::remFD(XrdPollInfo &pInfo, unsigned int events)
// It works out that ONESHOT mode or even CTL_MOD requests do not necessarily
// prevent epoll_wait() from returning on an error event. So, we must manually
// remove the fd from the set and assume the logic was actually correct. If it
// wasn't then the client will eventually timeout and retry the request.
// wasn't then the client will eventually timeout and retry the request. This
// may cause a double remove; so we don't consider these an arror.
//
if (epoll_ctl(PollDfd, EPOLL_CTL_DEL, pInfo.FD, &myEvents))
TRACEI(POLL, "Poller " <<PID <<" removing FD " <<pInfo.FD);
if (epoll_ctl(PollDfd, EPOLL_CTL_DEL, pInfo.FD, &myEvents)
&& (errno != ENOENT || events != 0))
{const char *why;
char buff[96];
if (events & (EPOLLHUP | EPOLLRDHUP)) why = "sever";
Expand Down

0 comments on commit c8f3616

Please sign in to comment.