diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-10-28 13:02:28 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-10-28 13:02:28 -0230 |
commit | d439795f3f59182c53e98e8b92fb3171768e03c3 (patch) | |
tree | 169feecdf4e2e61b8c4f0ddda199cd6e191e8adc /cpp/src/Ice/ProxyFactory.cpp | |
parent | Bug 3410 - Check connections for ACM at more appropriate interval (diff) | |
parent | Fixed bug 3513 - AMI retry bug (diff) | |
download | ice-d439795f3f59182c53e98e8b92fb3171768e03c3.tar.bz2 ice-d439795f3f59182c53e98e8b92fb3171768e03c3.tar.xz ice-d439795f3f59182c53e98e8b92fb3171768e03c3.zip |
Merge branch 'R3_3_branch' of ssh://cvs.wpb.zeroc.com/home/git/ice into R3_3_branch
Diffstat (limited to 'cpp/src/Ice/ProxyFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ProxyFactory.cpp | 59 |
1 files changed, 9 insertions, 50 deletions
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp index 2fc5316eb6d..eeb554d3e4a 100644 --- a/cpp/src/Ice/ProxyFactory.cpp +++ b/cpp/src/Ice/ProxyFactory.cpp @@ -25,32 +25,8 @@ using namespace std; using namespace Ice; using namespace IceInternal; -namespace -{ - -class RetryTask : public IceUtil::TimerTask -{ -public: - - RetryTask(const OutgoingAsyncPtr& out) : _out(out) - { - } - - virtual void - runTimerTask() - { - _out->__send(); - } - -private: - - const OutgoingAsyncPtr _out; -}; - -} - IceUtil::Shared* IceInternal::upCast(ProxyFactory* p) { return p; } - + ObjectPrx IceInternal::ProxyFactory::stringToProxy(const string& str) const { @@ -243,34 +219,17 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, } out << " because of exception\n" << ex; } - - if(interval > 0) + + if(out) { - if(out) - { - try - { - _instance->timer()->schedule(new RetryTask(out), IceUtil::Time::milliSeconds(interval)); - } - catch(const IceUtil::IllegalArgumentException&) // Expected if the communicator destroyed the timer. - { - throw CommunicatorDestroyedException(__FILE__, __LINE__); - } - } - else - { - // - // Sleep before retrying. - // - IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(interval)); - } + out->__retry(interval); } - else + else if(interval > 0) { - if(out) - { - out->__send(); - } + // + // Sleep before retrying. + // + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(interval)); } } |