summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/ConnectRequestHandler.cs32
1 files changed, 13 insertions, 19 deletions
diff --git a/csharp/src/Ice/ConnectRequestHandler.cs b/csharp/src/Ice/ConnectRequestHandler.cs
index fe93d6e4fb6..2ee1e4f66b0 100644
--- a/csharp/src/Ice/ConnectRequestHandler.cs
+++ b/csharp/src/Ice/ConnectRequestHandler.cs
@@ -22,27 +22,11 @@ namespace IceInternal
{
lock(this)
{
- try
- {
- if(!initialized())
- {
- _proxies.Add(proxy);
- }
- }
- catch(Ice.LocalException ex)
+ if(!initialized())
{
- //
- // Only throw if the connection didn't get established. If
- // it died after being established, we allow the caller to
- // retry the connection establishment by not throwing here.
- //
- if(_connection == null)
- {
- throw ex;
- }
+ _proxies.Add(proxy);
}
-
- return proxy.setRequestHandler__(_requestHandler);
+ return _requestHandler;
}
}
@@ -226,6 +210,16 @@ namespace IceInternal
if(_exception != null)
{
+ if(_connection != null)
+ {
+ //
+ // Only throw if the connection didn't get established. If
+ // it died after being established, we allow the caller to
+ // retry the connection establishment by not throwing here
+ // (the connection will throw RetryException).
+ //
+ return true;
+ }
throw _exception;
}
else