summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-06-12 16:52:36 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-06-12 16:52:36 +0200
commit31c9bffb12664cefc5020baf02871bf6449e24cd (patch)
tree12ed880f0cbbe4b4689e6901bcfff84093c5a6f0
parentFix build issue with previous commit (diff)
downloadice-31c9bffb12664cefc5020baf02871bf6449e24cd.tar.bz2
ice-31c9bffb12664cefc5020baf02871bf6449e24cd.tar.xz
ice-31c9bffb12664cefc5020baf02871bf6449e24cd.zip
Don't throw RetryException if the failure occurs during connection establishement (ICE-6589)
-rw-r--r--cpp/src/Ice/ConnectRequestHandler.cpp34
-rw-r--r--csharp/src/Ice/ConnectRequestHandler.cs15
-rw-r--r--java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java13
-rw-r--r--js/src/Ice/ConnectRequestHandler.js13
4 files changed, 20 insertions, 55 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp
index 993cb065c23..d69448743a9 100644
--- a/cpp/src/Ice/ConnectRequestHandler.cpp
+++ b/cpp/src/Ice/ConnectRequestHandler.cpp
@@ -74,19 +74,12 @@ ConnectRequestHandler::sendRequest(ProxyOutgoingBase* out)
{
{
Lock sync(*this);
- try
- {
- if(!initialized())
- {
- Request req;
- req.out = out;
- _requests.push_back(req);
- return false; // Not sent
- }
- }
- catch(const Ice::LocalException& ex)
+ if(!initialized())
{
- throw RetryException(ex);
+ Request req;
+ req.out = out;
+ _requests.push_back(req);
+ return false; // Not sent
}
}
return out->invokeRemote(_connection, _compress, _response) && !_response; // Finished if sent and no response.
@@ -102,19 +95,12 @@ ConnectRequestHandler::sendAsyncRequest(const ProxyOutgoingAsyncBasePtr& out)
out->cancelable(this); // This will throw if the request is canceled
}
- try
- {
- if(!initialized())
- {
- Request req;
- req.outAsync = out;
- _requests.push_back(req);
- return AsyncStatusQueued;
- }
- }
- catch(const Ice::LocalException& ex)
+ if(!initialized())
{
- throw RetryException(ex);
+ Request req;
+ req.outAsync = out;
+ _requests.push_back(req);
+ return AsyncStatusQueued;
}
}
return out->invokeRemote(_connection, _compress, _response);
diff --git a/csharp/src/Ice/ConnectRequestHandler.cs b/csharp/src/Ice/ConnectRequestHandler.cs
index 67ff6629605..fe93d6e4fb6 100644
--- a/csharp/src/Ice/ConnectRequestHandler.cs
+++ b/csharp/src/Ice/ConnectRequestHandler.cs
@@ -60,18 +60,11 @@ namespace IceInternal
outAsync.cancelable(this); // This will throw if the request is canceled
}
- try
- {
- if(!initialized())
- {
- _requests.AddLast(outAsync);
- sentCallback = null;
- return false;
- }
- }
- catch(Ice.LocalException ex)
+ if(!initialized())
{
- throw new RetryException(ex);
+ _requests.AddLast(outAsync);
+ sentCallback = null;
+ return false;
}
}
return outAsync.invokeRemote(_connection, _compress, _response, out sentCallback);
diff --git a/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java b/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java
index 11628f7fa41..5451c5768a0 100644
--- a/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java
+++ b/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java
@@ -60,17 +60,10 @@ public class ConnectRequestHandler
out.cancelable(this); // This will throw if the request is canceled
}
- try
- {
- if(!initialized())
- {
- _requests.add(out);
- return AsyncStatus.Queued;
- }
- }
- catch(Ice.LocalException ex)
+ if(!initialized())
{
- throw new RetryException(ex);
+ _requests.add(out);
+ return AsyncStatus.Queued;
}
}
return out.invokeRemote(_connection, _compress, _response);
diff --git a/js/src/Ice/ConnectRequestHandler.js b/js/src/Ice/ConnectRequestHandler.js
index 2d8067c6b4f..aed6381860c 100644
--- a/js/src/Ice/ConnectRequestHandler.js
+++ b/js/src/Ice/ConnectRequestHandler.js
@@ -86,17 +86,10 @@ var ConnectRequestHandler = Ice.Class({
out.__cancelable(this); // This will throw if the request is canceled
}
- try
- {
- if(!this.initialized())
- {
- this._requests.push(out);
- return AsyncStatus.Queued;
- }
- }
- catch(ex)
+ if(!this.initialized())
{
- throw new RetryException(ex);
+ this._requests.push(out);
+ return AsyncStatus.Queued;
}
return out.__invokeRemote(this._connection, this._compress, this._response);
},