diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-07-07 17:44:55 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-07-07 17:44:55 +0200 |
commit | d62cdf3a6869a67e37e10af25d7121aedb127deb (patch) | |
tree | d7bbd9101245ae6af5eedefc17f66034e15b7ae1 /csharp/src | |
parent | Fix for cpp xcodesdk test build failure (diff) | |
download | ice-d62cdf3a6869a67e37e10af25d7121aedb127deb.tar.bz2 ice-d62cdf3a6869a67e37e10af25d7121aedb127deb.tar.xz ice-d62cdf3a6869a67e37e10af25d7121aedb127deb.zip |
Fixed ICE-8237 - deadlock in ConnectRequestHandler
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/Ice/ConnectRequestHandler.cs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/csharp/src/Ice/ConnectRequestHandler.cs b/csharp/src/Ice/ConnectRequestHandler.cs index da1cd6e90fd..a03a6adb02c 100644 --- a/csharp/src/Ice/ConnectRequestHandler.cs +++ b/csharp/src/Ice/ConnectRequestHandler.cs @@ -138,32 +138,32 @@ namespace IceInternal _exception = ex; _proxies.Clear(); _proxy = null; // Break cyclic reference count. + Monitor.PulseAll(this); + } - // - // NOTE: remove the request handler *before* notifying the - // requests that the connection failed. It's important to ensure - // that future invocations will obtain a new connect request - // handler once invocations are notified. - // - try - { - _reference.getInstance().requestHandlerFactory().removeRequestHandler(_reference, this); - } - catch(Ice.CommunicatorDestroyedException) - { - // Ignore - } + // + // NOTE: remove the request handler *before* notifying the + // requests that the connection failed. It's important to ensure + // that future invocations will obtain a new connect request + // handler once invocations are notified. + // + try + { + _reference.getInstance().requestHandlerFactory().removeRequestHandler(_reference, this); + } + catch(Ice.CommunicatorDestroyedException) + { + // Ignore + } - foreach(ProxyOutgoingAsyncBase outAsync in _requests) + foreach(ProxyOutgoingAsyncBase outAsync in _requests) + { + if(outAsync.exception(_exception)) { - if(outAsync.exception(_exception)) - { - outAsync.invokeExceptionAsync(); - } + outAsync.invokeExceptionAsync(); } - _requests.Clear(); - Monitor.PulseAll(this); } + _requests.Clear(); } // |