diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-10-22 04:05:54 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-10-22 04:05:54 +0000 |
commit | aa44169f06e51ae9292b9af4bc972b555ff38e5e (patch) | |
tree | d880c443ad8630445fe84dc1edb257706575a052 /TAO/tao/LF_Connect_Strategy.cpp | |
parent | 8e2011d369e9a87ea86e25b3f5279d3c9bf288a1 (diff) | |
download | ATCD-aa44169f06e51ae9292b9af4bc972b555ff38e5e.tar.gz |
ChangeLogTag:Mon Oct 21 22:45:02 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/LF_Connect_Strategy.cpp')
-rw-r--r-- | TAO/tao/LF_Connect_Strategy.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/TAO/tao/LF_Connect_Strategy.cpp b/TAO/tao/LF_Connect_Strategy.cpp index 83ce6483ed1..e20cc3b3aa0 100644 --- a/TAO/tao/LF_Connect_Strategy.cpp +++ b/TAO/tao/LF_Connect_Strategy.cpp @@ -45,15 +45,26 @@ int TAO_LF_Connect_Strategy::wait (TAO_Connection_Handler *ch, ACE_Time_Value *max_wait_time) { - TAO_Transport *transport = - ch->transport (); + ACE_ASSERT(ch != 0); + + // @@todo We need to use a auto_ptr<>-like object here! + // TAO_Transport * transport = ch->get_transport_locked(); + TAO_Transport *transport = ch->transport (); + + // Basically the connection was EINPROGRESS, but before we could + // wait for it some other thread detected a failure and cleaned up + // the connection handler. + if(transport == 0) + { + return -1; + } if (TAO_debug_level > 2) { ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - LF_Connect_Strategy::wait, " "waiting for Transport[%d]\n", - transport->id())); + transport->id ())); } TAO_Leader_Follower &leader_follower = @@ -76,5 +87,8 @@ TAO_LF_Connect_Strategy::wait (TAO_Connection_Handler *ch, transport->id(), result)); } + // @@todo We need to use a auto_ptr<>-like object here! + // TAO_Transport::release(transport); + return result; } |