summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/SCIOP_Connection_Handler.cpp')
-rw-r--r--TAO/tao/Strategies/SCIOP_Connection_Handler.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp b/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp
index 60d586cef75..39d4a1125a6 100644
--- a/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp
+++ b/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp
@@ -154,16 +154,14 @@ TAO_SCIOP_Connection_Handler::open (void*)
return -1;
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - SCIOP_Connection_Handler::open, SCIOP ")
+ ACE_TEXT ("TAO (%P|%t) - Connection_Handler::open, SCIOP ")
ACE_TEXT ("connection to peer <%s> on %d\n"),
client, 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.
+ // Use C-style cast b/c otherwise we get warnings on lots of compilers
+ this->transport ()->id ((size_t) this->get_handle ());
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -185,7 +183,16 @@ TAO_SCIOP_Connection_Handler::close_connection (void)
int
TAO_SCIOP_Connection_Handler::handle_input (ACE_HANDLE h)
{
- return this->handle_input_eh (h, this);
+ int result =
+ this->handle_input_eh (h, this);
+
+ if (result == -1)
+ {
+ this->close_connection ();
+ return 0;
+ }
+
+ return result;
}
int
@@ -224,7 +231,9 @@ TAO_SCIOP_Connection_Handler::handle_close (ACE_HANDLE,
int
TAO_SCIOP_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