From 027de520f173d457a044ace19ef96b0fd7aa3b5b Mon Sep 17 00:00:00 2001 From: bala Date: Mon, 24 Mar 2003 19:31:04 +0000 Subject: ChangeLogTag: Mon Mar 24 13:12:16 2003 Balachandran Natarajan --- TAO/ChangeLog | 10 ++++++++++ TAO/tao/Connection_Handler.cpp | 4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 0a8d3a07e3b..98ec55bfabc 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,13 @@ +Mon Mar 24 13:12:16 2003 Balachandran Natarajan + + * tao/Connection_Handler.cpp (close_connection_eh): Call the + state_changed () on the LF_CH_Event with the lock held. If not, + we could potentially run into a race between two threads trying + to change states from + TAO_Connection_Handler::close_connection_eh () and + TAO_Transport::close_connection_shared (). The lock within + state_changed () is not sufficient to prevent the race. + Mon Mar 24 13:07:44 2003 Jeff Parsons * tao/Any_T.cpp: diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 574fa731ffe..84adb46e89f 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -515,13 +515,11 @@ TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler * eh) this->transport ()->wait_strategy ()->is_registered (0); } - + this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED); } ACE_ASSERT (this->transport () != 0); - this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED); - // Signal the transport that we will no longer have // a reference to it. This will eventually call // TAO_Transport::release (). -- cgit v1.2.1