summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-06-15 09:13:51 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-06-15 09:13:51 +0200
commit145cf69b7cdd21e96d44c5bc5690f23e2e9d12fe (patch)
tree52444d61f215b1c20c08b0dc6141a327aeebb4e5 /csharp/src
parentmore BT test fixes (diff)
downloadice-145cf69b7cdd21e96d44c5bc5690f23e2e9d12fe.tar.bz2
ice-145cf69b7cdd21e96d44c5bc5690f23e2e9d12fe.tar.xz
ice-145cf69b7cdd21e96d44c5bc5690f23e2e9d12fe.zip
Fixed ICE-8056 - communicator waitForShutdown hang
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/ACM.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/csharp/src/Ice/ACM.cs b/csharp/src/Ice/ACM.cs
index eb262b1e0da..bfe4417d03a 100644
--- a/csharp/src/Ice/ACM.cs
+++ b/csharp/src/Ice/ACM.cs
@@ -109,6 +109,14 @@ namespace IceInternal
{
if(_instance == null)
{
+ //
+ // Ensure all the connections have been cleared, it's important to wait here
+ // to prevent the timer destruction in IceInternal::Instance::destroy.
+ //
+ while(_connections.Count > 0)
+ {
+ System.Threading.Monitor.Wait(this);
+ }
return;
}
@@ -228,7 +236,7 @@ namespace IceInternal
if(_instance == null)
{
_connections.Clear();
- System.Threading.Monitor.Pulse(this);
+ System.Threading.Monitor.PulseAll(this);
return;
}