diff options
author | Steve Huston <shuston@riverace.com> | 2001-05-16 13:57:07 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2001-05-16 13:57:07 +0000 |
commit | de5d7a1fc1185c802fb8dbf5ea7ce0b2944e48f9 (patch) | |
tree | 6852a8045d678d7ec2d837a01c5373581ae24d1b /ace/ACE.cpp | |
parent | 0a59fa500e631f4ffe1805838f73950ff3037cac (diff) | |
download | ATCD-de5d7a1fc1185c802fb8dbf5ea7ce0b2944e48f9.tar.gz |
ChangeLogTag:Wed May 16 09:49:29 2001 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/ACE.cpp')
-rw-r--r-- | ace/ACE.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 2f2e01abcc2..f71eb8e4dd5 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -2541,7 +2541,8 @@ ACE::handle_timed_complete (ACE_HANDLE h, ex_handles.set_bit (h); #endif /* ACE_WIN32 */ - int need_to_check; + int need_to_check = 0; + int known_failure = 0; #if defined (ACE_WIN32) int n = ACE_OS::select (int (h) + 1, @@ -2579,8 +2580,14 @@ ACE::handle_timed_complete (ACE_HANDLE h, // any platform where we can't tell just from select() (e.g. AIX), // we also need to check for success/fail. #if defined (ACE_WIN32) + // On Win32, ex_handle set indicates a failure. We'll do the check + // to try and get an errno value, but the connect failed regardless of + // what getsockopt says about the error. if (ex_handles.is_set (h)) - need_to_check = 1; + { + need_to_check = 1; + known_failure = 1; + } #elif defined (VXWORKS) ACE_UNUSED_ARG (is_tli); @@ -2618,7 +2625,7 @@ ACE::handle_timed_complete (ACE_HANDLE h, int sock_err_len = sizeof (sock_err); ACE_OS::getsockopt (h, SOL_SOCKET, SO_ERROR, (char *)&sock_err, &sock_err_len); - if (sock_err != 0) + if (sock_err != 0 || known_failure) { h = ACE_INVALID_HANDLE; errno = sock_err; |