diff options
author | Marc Laukien <marc@zeroc.com> | 2002-07-29 17:17:00 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-07-29 17:17:00 +0000 |
commit | 8baa5365a1eb65ec4c3cb7d956ef6d147d5d57df (patch) | |
tree | a388849f132073d7a8970b6f8c9e25200e507cc1 /cpp/src/Ice/ConnectionFactory.cpp | |
parent | Added --ice option to Windows build files. (diff) | |
download | ice-8baa5365a1eb65ec4c3cb7d956ef6d147d5d57df.tar.bz2 ice-8baa5365a1eb65ec4c3cb7d956ef6d147d5d57df.tar.xz ice-8baa5365a1eb65ec4c3cb7d956ef6d147d5d57df.zip |
fixed cyclic dependency
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 4ff5b560e3d..e2e630dccca 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -234,7 +234,6 @@ IceInternal::OutgoingConnectionFactory::destroy() { return; } - #ifdef _STLP_BEGIN_NAMESPACE // voidbind2nd is an STLport extension for broken compilers in IceUtil/Functional.h for_each(_connections.begin(), _connections.end(), @@ -435,6 +434,14 @@ IceInternal::IncomingConnectionFactory::IncomingConnectionFactory(const Instance { ConnectionPtr connection = new Connection(_instance, _transceiver, _endpoint, _adapter); _connections.push_back(connection); + + // + // We don't need an adapter anymore if we don't use an + // acceptor. So we break cyclic object dependency + // now. This is necessary, because the object adapter + // never clears the list of incoming connections it keeps. + // + _adapter = 0; } else { @@ -468,7 +475,7 @@ IceInternal::IncomingConnectionFactory::waitUntilFinished() { ::IceUtil::Monitor< ::IceUtil::Mutex>::Lock sync(*this); - while(_adapter) + while(_state != StateClosed || _adapter) { wait(); } |