diff options
author | bala <balanatarajan@users.noreply.github.com> | 2000-11-10 23:31:22 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2000-11-10 23:31:22 +0000 |
commit | 46c0174a0bbc3c9a23e22230b34f706184979f31 (patch) | |
tree | 7586bda1eb5a47d7055140a861ae770eac8d1e45 /TAO/tao/Strategies | |
parent | 773c5642182c5d2e6c0366a1a757fb5bbcd41b67 (diff) | |
download | ATCD-46c0174a0bbc3c9a23e22230b34f706184979f31.tar.gz |
ChangeLogTag: Fri Nov 10 17:28:50 2000 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Strategies')
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connect.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Connect.cpp | 6 |
2 files changed, 14 insertions, 4 deletions
diff --git a/TAO/tao/Strategies/SHMIOP_Connect.cpp b/TAO/tao/Strategies/SHMIOP_Connect.cpp index ef00e89af7d..fe44967634e 100644 --- a/TAO/tao/Strategies/SHMIOP_Connect.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connect.cpp @@ -210,7 +210,8 @@ TAO_SHMIOP_Server_Connection_Handler::handle_close (ACE_HANDLE handle, rm)); --this->refcount_; - if (this->refcount_ == 0) + if (this->refcount_ == 0 && + this->is_registered ()) { // Set the flag to indicate that it is no longer registered with // the reactor, so that it isn't included in the set that is @@ -333,6 +334,14 @@ TAO_SHMIOP_Client_Connection_Handler (ACE_Thread_Manager *t, TAO_SHMIOP_Client_Connection_Handler::~TAO_SHMIOP_Client_Connection_Handler (void) { + // Cannot deal with errors, and therefore they are ignored. + this->transport_.send_buffered_messages (); + + this->peer ().close (); + + // Note that it also doesn't matter how much of the data was + // actually sent. + this->transport_.dequeue_all (); } int @@ -477,7 +486,6 @@ TAO_SHMIOP_Client_Connection_Handler::handle_cleanup (void) // Now do the decrement of the ref count this->decr_ref_count (); - this->peer ().close (); return 0; } diff --git a/TAO/tao/Strategies/UIOP_Connect.cpp b/TAO/tao/Strategies/UIOP_Connect.cpp index a5d80dc17f0..62354d685e2 100644 --- a/TAO/tao/Strategies/UIOP_Connect.cpp +++ b/TAO/tao/Strategies/UIOP_Connect.cpp @@ -200,7 +200,8 @@ TAO_UIOP_Server_Connection_Handler::handle_close (ACE_HANDLE handle, rm)); --this->refcount_; - if (this->refcount_ == 0) + if (this->refcount_ == 0 && + this->is_registered ()) { // Set the flag to indicate that it is no longer registered with // the reactor, so that it isn't included in the set that is @@ -341,6 +342,8 @@ TAO_UIOP_Client_Connection_Handler::~TAO_UIOP_Client_Connection_Handler (void) { // Cannot deal with errors, and therefore they are ignored. this->transport_.send_buffered_messages (); + + this->peer ().close (); } else { @@ -484,7 +487,6 @@ TAO_UIOP_Client_Connection_Handler::handle_cleanup (void) // Now do the decerment of the ref count this->decr_ref_count (); - this->peer ().close (); return 0; } |