diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-11-27 14:34:15 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-11-27 14:34:15 +0100 |
commit | 08c354c1cb70485c1f0ed83f814b04383a24e233 (patch) | |
tree | 0229ebe7cf0cb38b8a00a34df7cfd8a90ddf8d3a /cpp/src/Ice/OutgoingAsync.cpp | |
parent | ICE-5995 Use variable GRADLE not gradlew in makefile (diff) | |
download | ice-08c354c1cb70485c1f0ed83f814b04383a24e233.tar.bz2 ice-08c354c1cb70485c1f0ed83f814b04383a24e233.tar.xz ice-08c354c1cb70485c1f0ed83f814b04383a24e233.zip |
Fixed ICE-5985: Java background test failures
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 1719adc6b35..518867e06f2 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -40,6 +40,12 @@ OutgoingAsyncBase::completed(const Exception& ex) return finished(ex); } +void +OutgoingAsyncBase::retryException(const Exception& ex) +{ + assert(false); +} + OutgoingAsyncBase::OutgoingAsyncBase(const CommunicatorPtr& communicator, const InstancePtr& instance, const string& operation, @@ -112,6 +118,22 @@ ProxyOutgoingAsyncBase::completed(const Exception& exc) } } +void +ProxyOutgoingAsyncBase::retryException(const Exception& ex) +{ + try + { + handleRetryException(ex); + _instance->retryQueue()->add(this, 0); + } + catch(const Ice::Exception& exc) + { + if(completed(exc)) + { + invokeCompletedAsync(); + } + } +} void ProxyOutgoingAsyncBase::cancelable(const CancellationHandlerPtr& handler) @@ -212,7 +234,7 @@ ProxyOutgoingAsyncBase::invokeImpl(bool userThread) } catch(const RetryException& ex) { - handleRetryException(ex); + handleRetryException(*ex.get()); } catch(const Exception& ex) { @@ -286,7 +308,7 @@ ProxyOutgoingAsyncBase::finished(bool ok) } void -ProxyOutgoingAsyncBase::handleRetryException(const RetryException& exc) +ProxyOutgoingAsyncBase::handleRetryException(const Ice::Exception&) { _proxy->__setRequestHandler(_handler, 0); // Clear request handler and always retry. } @@ -647,10 +669,10 @@ ProxyFlushBatch::invoke() } void -ProxyFlushBatch::handleRetryException(const RetryException& ex) +ProxyFlushBatch::handleRetryException(const Ice::Exception& ex) { _proxy->__setRequestHandler(_handler, 0); // Clear request handler - ex.get()->ice_throw(); // No retries, we want to notify the user of potentially lost batch requests + ex.ice_throw(); // No retries, we want to notify the user of potentially lost batch requests } int |