From 8285e9955853a2688f479901a67fd715b49be00d Mon Sep 17 00:00:00 2001 From: Phil Mesnier Date: Tue, 8 Apr 2014 20:08:26 +0000 Subject: Tue Apr 8 19:27:23 UTC 2014 Phil Mesnier * ace/SOCK_Connector.cpp: Fix to allow the extended connection semantics on windows to be overridden by adding #define ACE_NON_BLOCKING_BUG_DELAY 0 to config.h prior to including config-win32.h. The default behavior is unchanged but in cases where a tight connection timeout is requested and the application's using local connections on newer windows platforms, the wait then try again step may be skipped. --- ACE/ace/SOCK_Connector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ACE/ace/SOCK_Connector.cpp') diff --git a/ACE/ace/SOCK_Connector.cpp b/ACE/ace/SOCK_Connector.cpp index 0aa949b5c97..e3c672c0843 100644 --- a/ACE/ace/SOCK_Connector.cpp +++ b/ACE/ace/SOCK_Connector.cpp @@ -251,7 +251,7 @@ ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream, // We failed to get connected. if (h == ACE_INVALID_HANDLE) { -#if defined (ACE_WIN32) +#if defined (ACE_NON_BLOCKING_BUG_DELAY) && ACE_NON_BLOCKING_BUG_DELAY > 0 // Win32 has a timing problem - if you check to see if the // connection has completed too fast, it will fail - so wait // microseconds to let it catch up @@ -261,14 +261,14 @@ ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream, h = ACE::handle_timed_complete (new_stream.get_handle (), tv); if (h == ACE_INVALID_HANDLE) { -#endif /* ACE_WIN32 */ +#endif /* ACE_NON_BLOCKING_BUG_DELAY */ // Save/restore errno. ACE_Errno_Guard error (errno); new_stream.close (); return -1; -#if defined (ACE_WIN32) +#if defined (ACE_NON_BLOCKING_BUG_DELAY) && ACE_NON_BLOCKING_BUG_DELAY > 0 } -#endif /* ACE_WIN32 */ +#endif /* ACE_NON_BLOCKING_BUG_DELAY */ } if (remote_sap != 0) -- cgit v1.2.1