From d7705de4130a361bedb47fd3fc3a63cb0430d4dd Mon Sep 17 00:00:00 2001 From: Steve Huston Date: Thu, 29 Nov 2012 15:10:38 +0000 Subject: ChangeLogTag:Thu Nov 29 15:08:26 UTC 2012 Steve Huston --- ChangeLog | 6 ++++++ ace/ACE.cpp | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4cbc1938005..d2c8d3b12fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Nov 29 15:08:26 UTC 2012 Steve Huston + + * ace/ACE.cpp (handle_timed_complete): Adapt to an occasionally seen + scenario where only the POLLERR bit is set on a failed connect. + This is for the poll() case, not select(). + Tue Nov 20 23:55:57 UTC 2012 Steve Huston * ace/config-hpux-11.00.h: diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 3fedcc67109..5a425973294 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -2548,7 +2548,13 @@ ACE::handle_timed_complete (ACE_HANDLE h, else # if defined (ACE_HAS_POLL) - need_to_check = (fds.revents & POLLIN); + { + // The "official" bit for failed connect is POLLIN. However, POLLERR + // is often set and there are occasional cases seen with some kernels + // where only POLLERR is set on a failed connect. + need_to_check = (fds.revents & POLLIN) || (fds.revents & POLLERR); + known_failure = (fds.revents & POLLERR) + } # else need_to_check = true; # endif /* ACE_HAS_POLL */ -- cgit v1.2.1