diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-10-01 16:32:16 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-10-01 16:32:16 +0200 |
commit | 2063204f644284eee4683faf017a86459baccb03 (patch) | |
tree | c243027f28ca2ede63c78a9037e67f88a5376a5f /cpp/src/Ice/RetryQueue.cpp | |
parent | ICE-5656 java test/Ice/exception eats all error messages (diff) | |
download | ice-2063204f644284eee4683faf017a86459baccb03.tar.bz2 ice-2063204f644284eee4683faf017a86459baccb03.tar.xz ice-2063204f644284eee4683faf017a86459baccb03.zip |
Lots of minor fixes, few simplifications to OutgoingAsync code
Diffstat (limited to 'cpp/src/Ice/RetryQueue.cpp')
-rw-r--r-- | cpp/src/Ice/RetryQueue.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cpp/src/Ice/RetryQueue.cpp b/cpp/src/Ice/RetryQueue.cpp index 6d58bc66fda..adfb6bf9440 100644 --- a/cpp/src/Ice/RetryQueue.cpp +++ b/cpp/src/Ice/RetryQueue.cpp @@ -18,7 +18,7 @@ using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(RetryQueue* p) { return p; } -IceInternal::RetryTask::RetryTask(const RetryQueuePtr& queue, const OutgoingAsyncMessageCallbackPtr& outAsync) : +IceInternal::RetryTask::RetryTask(const RetryQueuePtr& queue, const AsyncResultPtr& outAsync) : _queue(queue), _outAsync(outAsync) { } @@ -26,7 +26,14 @@ IceInternal::RetryTask::RetryTask(const RetryQueuePtr& queue, const OutgoingAsyn void IceInternal::RetryTask::runTimerTask() { - _outAsync->__processRetry(false); + try + { + _outAsync->__processRetry(); + } + catch(const Ice::LocalException& ex) + { + _outAsync->__invokeExceptionAsync(ex); + } // // NOTE: this must be called last, destroy() blocks until all task @@ -40,7 +47,7 @@ IceInternal::RetryTask::runTimerTask() void IceInternal::RetryTask::destroy() { - _outAsync->__processRetry(true); + _outAsync->__invokeExceptionAsync(CommunicatorDestroyedException(__FILE__, __LINE__)); } bool @@ -54,7 +61,7 @@ IceInternal::RetryQueue::RetryQueue(const InstancePtr& instance) : _instance(ins } void -IceInternal::RetryQueue::add(const OutgoingAsyncMessageCallbackPtr& out, int interval) +IceInternal::RetryQueue::add(const AsyncResultPtr& out, int interval) { Lock sync(*this); if(!_instance) |