summaryrefslogtreecommitdiff
path: root/csharp/src
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 /csharp/src
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 'csharp/src')
-rw-r--r--csharp/src/Ice/ACM.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/csharp/src/Ice/ACM.cs b/csharp/src/Ice/ACM.cs
index b8af4ddff49..eb262b1e0da 100644
--- a/csharp/src/Ice/ACM.cs
+++ b/csharp/src/Ice/ACM.cs
@@ -111,8 +111,27 @@ namespace IceInternal
{
return;
}
+
+ if(_connections.Count > 0)
+ {
+ //
+ // Cancel the scheduled timer task and schedule it again now to clear the
+ // connection set from the timer thread.
+ //
+ _instance.timer().cancel(this);
+ _instance.timer().schedule(this, 0);
+ }
+
_instance = null;
_changes.Clear();
+
+ //
+ // Wait for the connection set to be cleared by the timer thread.
+ //
+ while(_connections.Count > 0)
+ {
+ System.Threading.Monitor.Wait(this);
+ }
}
}
@@ -209,6 +228,7 @@ namespace IceInternal
if(_instance == null)
{
_connections.Clear();
+ System.Threading.Monitor.Pulse(this);
return;
}