diff options
Diffstat (limited to 'tao/Transport_Connector.cpp')
-rw-r--r-- | tao/Transport_Connector.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/tao/Transport_Connector.cpp b/tao/Transport_Connector.cpp index f71504ba0b7..fc6463a776a 100644 --- a/tao/Transport_Connector.cpp +++ b/tao/Transport_Connector.cpp @@ -1,3 +1,6 @@ +// -*- C++ -*- +// $Id$ + #include "tao/Transport_Connector.h" #include "tao/Transport.h" #include "tao/ORB_Core.h" @@ -878,6 +881,23 @@ TAO_Connector::wait_for_connection_completion ( return true; } +void +TAO_Connector::cleanup_pending (TAO_Transport *&the_winner, + TAO_Transport **transport, + unsigned int count) +{ + // It is possible that we have more than one connection that happened + // to complete, or that none completed. Therefore we need to traverse + // the list and ensure that all of the losers are closed. + for (unsigned int i = 0; i < count; i++) + { + if (transport[i] != the_winner) + this->check_connection_closure (transport[i]->connection_handler()); + // since we are doing this on may connections, the result isn't + // particularly important. + } +} + bool TAO_Connector::wait_for_connection_completion ( TAO::Profile_Transport_Resolver *r, @@ -939,16 +959,7 @@ TAO_Connector::wait_for_connection_completion ( } } - // It is possible that we have more than one connection that happened - // to complete, or that none completed. Therefore we need to traverse - // the list and ensure that all of the losers are closed. - for (unsigned int i = 0; i < count; i++) - { - if (transport[i] != the_winner) - this->check_connection_closure (transport[i]->connection_handler()); - // since we are doing this on may connections, the result isn't - // particularly important. - } + this->cleanup_pending (the_winner, transport, count); // In case of errors. if (the_winner == 0) |