diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-10-16 11:31:59 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-10-16 11:31:59 +0200 |
commit | ba0d6f63970277f5ccc3bf6447a5c451d007b36e (patch) | |
tree | 88a7217bec554a95a4ca256bb53d3fa6c08f5db1 /cpp/src/Ice/ProxyFactory.cpp | |
parent | Fixed py and rb to compile again with Enpoint changes (diff) | |
download | ice-ba0d6f63970277f5ccc3bf6447a5c451d007b36e.tar.bz2 ice-ba0d6f63970277f5ccc3bf6447a5c451d007b36e.tar.xz ice-ba0d6f63970277f5ccc3bf6447a5c451d007b36e.zip |
Added support for per-OA ACM and fix for retry on CloseConnectionException
Diffstat (limited to 'cpp/src/Ice/ProxyFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ProxyFactory.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp index 9d8ef8cb292..f139c87222d 100644 --- a/cpp/src/Ice/ProxyFactory.cpp +++ b/cpp/src/Ice/ProxyFactory.cpp @@ -203,8 +203,18 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, ++cnt; assert(cnt > 0); - - if(cnt > static_cast<int>(_retryIntervals.size())) + + int interval; + if(cnt == static_cast<int>(_retryIntervals.size() + 1) && + dynamic_cast<const CloseConnectionException*>(&ex)) + { + // + // A close connection exception is always retried at least once, even if the retry + // limit is reached. + // + interval = 0; + } + else if(cnt > static_cast<int>(_retryIntervals.size())) { if(traceLevels->retry >= 1) { @@ -213,8 +223,10 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, } ex.ice_throw(); } - - int interval = _retryIntervals[cnt - 1]; + else + { + interval = _retryIntervals[cnt - 1]; + } if(traceLevels->retry >= 1) { |