summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/UIOP_Connection_Handler.cpp')
-rw-r--r--TAO/tao/Strategies/UIOP_Connection_Handler.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
index f3ad70d0fcd..7aa645abde1 100644
--- a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
+++ b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
@@ -97,11 +97,8 @@ TAO_UIOP_Connection_Handler::open (void*)
ACE_TEXT ("<%s> on %d\n"),
addr.get_path_name (), this->peer ().get_handle ()));
- // Set that the transport is now connected, if fails we return -1
- // Use C-style cast b/c otherwise we get warnings on lots of
- // compilers
- if (!this->transport ()->post_open ((size_t) this->get_handle ()))
- return -1;
+ // Set the id in the transport now that we're active.
+ this->transport ()->id ((size_t) this->get_handle ());
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -123,7 +120,16 @@ TAO_UIOP_Connection_Handler::close_connection (void)
int
TAO_UIOP_Connection_Handler::handle_input (ACE_HANDLE h)
{
- return this->handle_input_eh (h, this);
+ const int result =
+ this->handle_input_eh (h, this);
+
+ if (result == -1)
+ {
+ this->close_connection ();
+ return 0;
+ }
+
+ return result;
}
int
@@ -162,7 +168,9 @@ TAO_UIOP_Connection_Handler::handle_close (ACE_HANDLE,
int
TAO_UIOP_Connection_Handler::close (u_long)
{
- return this->close_handler ();
+ this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED);
+ this->transport ()->remove_reference ();
+ return 0;
}
int