diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2003-08-14 17:57:21 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2003-08-14 17:57:21 +0000 |
commit | eb2796d0fe198e47b4303398488d7634f573a7d1 (patch) | |
tree | 86c00d572c6e5462f2f0dfba0f5afeb2a91d2ea4 /ace/SSL | |
parent | 692ad03e578424bd88e1c2621c1887ce4d5a7348 (diff) | |
download | ATCD-eb2796d0fe198e47b4303398488d7634f573a7d1.tar.gz |
ChangeLogTag:Thu Aug 14 10:56:57 2003 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ace/SSL')
-rw-r--r-- | ace/SSL/SSL_SOCK_Acceptor.cpp | 4 | ||||
-rw-r--r-- | ace/SSL/SSL_SOCK_Connector.cpp | 8 | ||||
-rw-r--r-- | ace/SSL/SSL_SOCK_Connector.h | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/ace/SSL/SSL_SOCK_Acceptor.cpp b/ace/SSL/SSL_SOCK_Acceptor.cpp index 92b6ab7da76..0567af14d5a 100644 --- a/ace/SSL/SSL_SOCK_Acceptor.cpp +++ b/ace/SSL/SSL_SOCK_Acceptor.cpp @@ -60,6 +60,10 @@ ACE_SSL_SOCK_Acceptor::ssl_accept (ACE_SSL_SOCK_Stream &new_stream, return -1; } + // Block indefinitely if timeout == ACE_Time_Value::zero. + if (timeout != 0 && *timeout == ACE_Time_Value::zero) + timeout = 0; + // Take into account the time between each select() call below. ACE_Countdown_Time countdown (timeout); diff --git a/ace/SSL/SSL_SOCK_Connector.cpp b/ace/SSL/SSL_SOCK_Connector.cpp index 80d6dcb7835..07d98071757 100644 --- a/ace/SSL/SSL_SOCK_Connector.cpp +++ b/ace/SSL/SSL_SOCK_Connector.cpp @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "SSL_SOCK_Connector.h" @@ -140,12 +141,15 @@ ACE_SSL_SOCK_Connector::ssl_connect (ACE_SSL_SOCK_Stream &new_stream, if (status == 1) { // Must have at least one handle to wait for at this point. - ACE_ASSERT (rd_handle.num_set() == 1 || wr_handle.num_set () == 1); + ACE_ASSERT (rd_handle.num_set () == 1 || wr_handle.num_set () == 1); + + // Block indefinitely if timeout value is + // ACE_Time_Value::zero. status = ACE::select (int (handle) + 1, &rd_handle, &wr_handle, 0, - timeout); + (t == ACE_Time_Value::zero ? 0 : &t)); (void) countdown.update (); diff --git a/ace/SSL/SSL_SOCK_Connector.h b/ace/SSL/SSL_SOCK_Connector.h index b77fd850c9f..a2c43ab894a 100644 --- a/ace/SSL/SSL_SOCK_Connector.h +++ b/ace/SSL/SSL_SOCK_Connector.h @@ -312,4 +312,3 @@ private: #include /**/ "ace/post.h" #endif /* ACE_SSL_SOCK_CONNECTOR_H */ - |