diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-05-06 15:34:59 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-05-06 15:34:59 +0000 |
commit | 492207f8d6bc0af6d8281126c38c7081b2d10564 (patch) | |
tree | da29082c2f85aa91bf32b6fd6288600b5c5200b1 /TAO/tao/Wait_On_Read.cpp | |
parent | 1aa6584abb1f5f36b4a4f44d4559926daf2f1088 (diff) | |
download | ATCD-492207f8d6bc0af6d8281126c38c7081b2d10564.tar.gz |
ChangeLogTag: Sun May 6 10:02:08 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Wait_On_Read.cpp')
-rw-r--r-- | TAO/tao/Wait_On_Read.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/TAO/tao/Wait_On_Read.cpp b/TAO/tao/Wait_On_Read.cpp index 4e73325944a..3320298e49d 100644 --- a/TAO/tao/Wait_On_Read.cpp +++ b/TAO/tao/Wait_On_Read.cpp @@ -22,16 +22,32 @@ TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time, int &reply_received) { reply_received = 0; - while (reply_received == 0) + + // Do the same sort of looping that is done in other wait + // strategies. + int retval = 0; + while (1) { - reply_received = + retval = this->transport_->read_process_message (max_wait_time, 1); + + // If we got our reply, no need to run the loop any + // further. + if (reply_received) + break; + + // @@ We are not checking for timeouts here... + + // If we got an error just break + if (retval == -1) + break; } - if (reply_received == -1) + if (reply_received == -1 || retval == -1) { this->transport_->close_connection (); } + return (reply_received == 1 ? 0 : reply_received); } |