diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-26 22:23:43 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-26 22:23:43 +0000 |
commit | 3651ca8664386b4bcd3ae8a4880c088db4a5dac3 (patch) | |
tree | a44bd9c53590c7dff795f3b49014c82388f5ef4d /cpp/src/Ice/ConnectionFactory.cpp | |
parent | fix (diff) | |
download | ice-3651ca8664386b4bcd3ae8a4880c088db4a5dac3.tar.bz2 ice-3651ca8664386b4bcd3ae8a4880c088db4a5dac3.tar.xz ice-3651ca8664386b4bcd3ae8a4880c088db4a5dac3.zip |
moved follower promotion after accept
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 56bb415d6eb..39207ed48b0 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -308,11 +308,10 @@ IceInternal::IncomingConnectionFactory::message(BasicStream&, const ThreadPoolPt { ::IceUtil::Monitor< ::IceUtil::Mutex>::Lock sync(*this); - threadPool->promoteFollower(); - if(_state != StateActive) { IceUtil::ThreadControl::yield(); + threadPool->promoteFollower(); return; } @@ -334,11 +333,13 @@ IceInternal::IncomingConnectionFactory::message(BasicStream&, const ThreadPoolPt { // TODO: bandaid. Takes care of SSL Handshake problems during // creation of a Transceiver. Ignore, nothing we can do here. + threadPool->promoteFollower(); return; } catch(const TimeoutException&) { // Ignore timeouts. + threadPool->promoteFollower(); return; } catch(const LocalException& ex) @@ -349,8 +350,20 @@ IceInternal::IncomingConnectionFactory::message(BasicStream&, const ThreadPoolPt out << "connection exception:\n" << ex << '\n' << _acceptor->toString(); } setState(StateClosed); + threadPool->promoteFollower(); return; } + catch(...) + { + threadPool->promoteFollower(); + throw; + } + + // + // We must promote a follower after we accepted the new + // connection. + // + threadPool->promoteFollower(); // // Create and activate a connection object for the connection. |