diff options
Diffstat (limited to 'TAO/tao/Strategies/DIOP_Connection_Handler.cpp')
-rw-r--r-- | TAO/tao/Strategies/DIOP_Connection_Handler.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp index 8854b94696e..bba8297505f 100644 --- a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp @@ -124,11 +124,8 @@ TAO_DIOP_Connection_Handler::open (void*) this->local_addr_.get_port_number ())); } - // 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); @@ -169,7 +166,16 @@ TAO_DIOP_Connection_Handler::close_connection (void) int TAO_DIOP_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 @@ -212,7 +218,9 @@ TAO_DIOP_Connection_Handler::handle_close (ACE_HANDLE, int TAO_DIOP_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 |