diff options
author | bala <balanatarajan@users.noreply.github.com> | 2004-02-07 00:47:32 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2004-02-07 00:47:32 +0000 |
commit | 44e6862d0e9dfa9f0cc0d752ae510d1272d244c4 (patch) | |
tree | 0a2c18246875e1f9f9a95b1776bb4a3cfc1b9bc8 | |
parent | 319d9587232d7e56ab9ccea99538704679fd4a95 (diff) | |
download | ATCD-44e6862d0e9dfa9f0cc0d752ae510d1272d244c4.tar.gz |
ChangeLogTag:Fri Feb 6 18:56:21 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 29 | ||||
-rw-r--r-- | TAO/tao/Connection_Handler.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Thread_Per_Connection_Handler.cpp | 1 |
3 files changed, 35 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 66eadb20c07..76dc038d2d9 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,32 @@ +Fri Feb 6 18:56:21 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * tao/Connection_Handler.cpp (svc_i): + + A mistake while we keep looping trying to read messages. The + loop used the availability of the transport () as a + condition to exit the loop. But in the world after BUG 1020 was + fixed, this condition is not right. The lifetime of the + transport and the lifetime of the connection handler was tied + together. The transport will never get deleted till the + connection handler is deleted. The connection handler will never + get deleted since the thread is using it. This is a vicious + loop. Therefore we have removed that condition. We have added + another condition to check for exiting out of the loop. The new + condition basically checks the status of read () call. If the + read call fails (we have taken care of timeouts here), we exit + out of the loop. + + * tao/Thread_Per_Connection_Handler.cpp: + + Before we call remove_ref () on the transport, just make sure + to call close_connection () on the connection handler. Reactive + servers do that automotaically through a call from the + reactor. + + These fixes should take care of the leak problems that Chris + Reed <cr@apama.com> reported. Thanks to Chris for reporting + this. + Fri Feb 6 22:55:30 UTC 2004 Craig Rodrigues <crodrigu@bbn.com> * tao/CORBALOC_Parser.cpp: Remove TAO_HAS_SCIOP. diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 0231bbcb364..18be0672663 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -117,7 +117,6 @@ TAO_Connection_Handler::svc_i (void) // occured. // - Or if during processing a return value of -1 is received. while (!this->orb_core_->has_shutdown () - && this->transport () && result >= 0) { // Let the transport know that it is used @@ -138,6 +137,11 @@ TAO_Connection_Handler::svc_i (void) // fails if the socket has been closed. errno = 0; } + else if (result == -1) + { + // Something went wrong with the socket. Just quit + return result; + } current_timeout = timeout; diff --git a/TAO/tao/Thread_Per_Connection_Handler.cpp b/TAO/tao/Thread_Per_Connection_Handler.cpp index a0840d54f23..2a09e00dbf1 100644 --- a/TAO/tao/Thread_Per_Connection_Handler.cpp +++ b/TAO/tao/Thread_Per_Connection_Handler.cpp @@ -19,6 +19,7 @@ TAO_Thread_Per_Connection_Handler::TAO_Thread_Per_Connection_Handler ( TAO_Thread_Per_Connection_Handler::~TAO_Thread_Per_Connection_Handler (void) { + this->ch_->close_connection (); this->ch_->transport ()->remove_reference (); } |