summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ACM.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-06-13 14:39:41 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-06-13 14:39:41 +0200
commitc43d26cb98eb2ab48910f96600b9f402a15af499 (patch)
treefde5db315a9d2da61235938f70c0be38cadc0bf1 /cpp/src/Ice/ACM.cpp
parentOnly install zeroc.ice.v140 when ICE_BIN_DIST == cpp (diff)
downloadice-c43d26cb98eb2ab48910f96600b9f402a15af499.tar.bz2
ice-c43d26cb98eb2ab48910f96600b9f402a15af499.tar.xz
ice-c43d26cb98eb2ab48910f96600b9f402a15af499.zip
Another fix for ICE-8015 - clearing connections from ACM monitor
Diffstat (limited to 'cpp/src/Ice/ACM.cpp')
-rw-r--r--cpp/src/Ice/ACM.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/src/Ice/ACM.cpp b/cpp/src/Ice/ACM.cpp
index 9392df6aacc..bb620d07430 100644
--- a/cpp/src/Ice/ACM.cpp
+++ b/cpp/src/Ice/ACM.cpp
@@ -94,8 +94,26 @@ IceInternal::FactoryACMMonitor::destroy()
return;
}
+ //
+ // Cancel the scheduled timer task and schedule it again now to clear the
+ // connection set from the timer thread.
+ //
+ if(!_connections.empty())
+ {
+ _instance->timer()->cancel(ICE_SHARED_FROM_THIS);
+ _instance->timer()->schedule(ICE_SHARED_FROM_THIS, IceUtil::Time());
+ }
+
_instance = 0;
_changes.clear();
+
+ //
+ // Wait for the connection set to be cleared by the timer thread.
+ //
+ while(!_connections.empty())
+ {
+ wait();
+ }
}
void
@@ -187,6 +205,7 @@ IceInternal::FactoryACMMonitor::runTimerTask()
if(!_instance)
{
_connections.clear();
+ notify();
return;
}