summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionFactory.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-06-21 17:37:19 +0000
committerMarc Laukien <marc@zeroc.com>2002-06-21 17:37:19 +0000
commit5ef49e3dad3dcf9159e1865a3d7c6c25779d22ab (patch)
tree857c5177d6dcd70ee9b3e4901a020415942cba78 /cpp/src/Ice/ConnectionFactory.cpp
parentfix (diff)
downloadice-5ef49e3dad3dcf9159e1865a3d7c6c25779d22ab.tar.bz2
ice-5ef49e3dad3dcf9159e1865a3d7c6c25779d22ab.tar.xz
ice-5ef49e3dad3dcf9159e1865a3d7c6c25779d22ab.zip
fixed cyclic dependency
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index 27d8bc94c6c..bd28f451dde 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -402,7 +402,13 @@ IceInternal::IncomingConnectionFactory::finished(const ThreadPoolPtr& threadPool
_acceptor->close();
- _finished = true;
+ //
+ // Break cyclic object dependency. This is necessary, because
+ // the object adapter never clears the list of incoming
+ // connections it keeps.
+ //
+ _adapter = 0;
+
notifyAll(); // For waitUntilFinished().
}
}
@@ -432,7 +438,6 @@ IceInternal::IncomingConnectionFactory::IncomingConnectionFactory(const Instance
_endpoint(endpoint),
_adapter(adapter),
_state(StateHolding),
- _finished(false),
_registeredWithPool(false)
{
DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
@@ -468,7 +473,7 @@ IceInternal::IncomingConnectionFactory::IncomingConnectionFactory(const Instance
IceInternal::IncomingConnectionFactory::~IncomingConnectionFactory()
{
assert(_state == StateClosed);
- assert(_finished);
+ assert(!_adapter);
}
void
@@ -483,7 +488,7 @@ IceInternal::IncomingConnectionFactory::waitUntilFinished()
{
::IceUtil::Monitor< ::IceUtil::Mutex>::Lock sync(*this);
- while (!_finished)
+ while (_adapter)
{
wait();
}