diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-11-05 12:21:24 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-11-05 12:21:24 -0330 |
commit | e67bc9d134e2727e1da51729665c672904daf6c0 (patch) | |
tree | 784284319746e5e4a807c469c50ed5c8b671193d /cpp/src/Ice/ProxyFactory.cpp | |
parent | Merge branch 'R3_3_branch' (diff) | |
parent | Bug 3386 - slice errors with wrong line numbers (diff) | |
download | ice-e67bc9d134e2727e1da51729665c672904daf6c0.tar.bz2 ice-e67bc9d134e2727e1da51729665c672904daf6c0.tar.xz ice-e67bc9d134e2727e1da51729665c672904daf6c0.zip |
Merge branch '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)); } } |