summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2020-02-20 12:45:29 +0100
committerBenoit Foucher <benoit@zeroc.com>2020-02-20 12:45:29 +0100
commitd5b4c4091ce634d8e99ab0150acd853bd209df2a (patch)
treec4b415bf56f65422b4ab0efd8e8602647af66e99 /csharp/src
parentAdded comments to IceDiscovery.ice fixes #697 (diff)
downloadice-d5b4c4091ce634d8e99ab0150acd853bd209df2a.tar.bz2
ice-d5b4c4091ce634d8e99ab0150acd853bd209df2a.tar.xz
ice-d5b4c4091ce634d8e99ab0150acd853bd209df2a.zip
Fixed invalid access to _instance in RetryQueue, fixes #681
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/RetryQueue.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/csharp/src/Ice/RetryQueue.cs b/csharp/src/Ice/RetryQueue.cs
index a97dd8feb82..3bf3a49c040 100644
--- a/csharp/src/Ice/RetryQueue.cs
+++ b/csharp/src/Ice/RetryQueue.cs
@@ -131,12 +131,15 @@ namespace IceInternal
{
if(_requests.Remove(task))
{
- if(_instance == null && _requests.Count == 0)
+ if(_instance != null)
+ {
+ return _instance.timer().cancel(task);
+ }
+ else if(_requests.Count == 0)
{
// If we are destroying the queue, destroy is probably waiting on the queue to be empty.
System.Threading.Monitor.Pulse(this);
}
- return _instance.timer().cancel(task);
}
return false;
}