summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97a10
-rw-r--r--ace/Connector.cpp7
-rw-r--r--ace/README1
-rw-r--r--ace/SOCK_Connector.cpp7
4 files changed, 19 insertions, 6 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index 9af1077872a..51ebd881440 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,5 +1,15 @@
Thu Apr 24 13:56:28 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+ * ace/SOCK_Connector.cpp (complete): There's a bug in WinNT that
+ causes non-blocking connects to fail. The workaround is to
+ sleep for 1 millisecond. Thanks to Steve Huston
+ <shuston@riverace.com> for reporting this.
+
+ * ace/Connector.cpp (handle_output): There's a bug in WinNT that
+ causes non-blocking connects to fail. The workaround is to
+ sleep for 1 millisecond. Thanks to Steve Huston
+ <shuston@riverace.com> for reporting this.
+
* tests/Conn_Test.cpp: Changed from operator != to operator == to
be consistent with what is required by the ACE_Hash_Map_Manager.
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
index e2654f6a95c..e8a6e96f908 100644
--- a/ace/Connector.cpp
+++ b/ace/Connector.cpp
@@ -284,9 +284,10 @@ ACE_Connector<SH, PR_CO_2>::handle_output (ACE_HANDLE handle)
#if defined (ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS)
// Win32 has a timing problem - if you check to see if the
- // connection has completed too fast, it will fail - so wait a bit
- // to let it catch up.
- ACE_OS::sleep (0);
+ // connection has completed too fast, it will fail - so wait 1
+ // millisecond to let it catch up.
+ ACE_Time_Value tv (0, 1000);
+ ACE_OS::sleep (tv);
#endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */
// Check to see if we're connected.
diff --git a/ace/README b/ace/README
index 7d5e114ace0..7bd219bd34e 100644
--- a/ace/README
+++ b/ace/README
@@ -29,6 +29,7 @@ ACE_HAS_BROKEN_CTIME Compiler/platform uses macro for ctime (e.g., MVS)
ACE_HAS_BROKEN_HPUX_TEMPLATES Earlier versions of HP/UX C++ are damned...
ACE_HAS_BROKEN_MSG_H Platform headers don't support <msg.h> prototypes
ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the mmap(2) header files with extern "C".
+ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS Platform has a bug with non-blocking connects (e.g., WinNT 4.0)
ACE_HAS_BROKEN_POSIX_TIME Platform defines struct timespec in <sys/timers.h>
ACE_HAS_BROKEN_RANDR OS/compiler's header files are inconsistent with libC definition of rand_r().
ACE_HAS_BROKEN_SENDMSG OS/compiler omits the const from the sendmsg() prototype.
diff --git a/ace/SOCK_Connector.cpp b/ace/SOCK_Connector.cpp
index e38ac60e8fd..5d7335910a4 100644
--- a/ace/SOCK_Connector.cpp
+++ b/ace/SOCK_Connector.cpp
@@ -110,9 +110,10 @@ ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream,
ACE_TRACE ("ACE_SOCK_Connector::complete");
#if defined (ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS)
// Win32 has a timing problem - if you check to see if the
- // connection has completed too fast, it will fail - so wait a bit
- // to let it catch up.
- ACE_OS::sleep (0);
+ // connection has completed too fast, it will fail - so wait 1
+ // millisecond to let it catch up.
+ ACE_Time_Value tv (0, 1000);
+ ACE_OS::sleep (tv);
#endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */
ACE_HANDLE h = ACE::handle_timed_complete (this->get_handle (), tv);