diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-10-15 17:26:45 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-10-15 17:26:45 +0200 |
commit | f94eb5f938d33dc2ce9b09b03b5dc6ccf7bd46c2 (patch) | |
tree | 6b12ef2c59421702743048393f4757c0d1e0c504 /cpp/src/Ice/AsyncResult.cpp | |
parent | ICE-5732 missing tracing in throughput demo (diff) | |
download | ice-f94eb5f938d33dc2ce9b09b03b5dc6ccf7bd46c2.tar.bz2 ice-f94eb5f938d33dc2ce9b09b03b5dc6ccf7bd46c2.tar.xz ice-f94eb5f938d33dc2ce9b09b03b5dc6ccf7bd46c2.zip |
Fixed ICE-5666: setting the invocation timeout to -2 provides the previous connection timeouts
Diffstat (limited to 'cpp/src/Ice/AsyncResult.cpp')
-rw-r--r-- | cpp/src/Ice/AsyncResult.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/cpp/src/Ice/AsyncResult.cpp b/cpp/src/Ice/AsyncResult.cpp index 03abc55e020..dc1b5689339 100644 --- a/cpp/src/Ice/AsyncResult.cpp +++ b/cpp/src/Ice/AsyncResult.cpp @@ -420,25 +420,20 @@ AsyncResult::cancel(const Ice::LocalException& ex) void AsyncResult::cancelable(const CancellationHandlerPtr& handler) { - { - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); - if(!_cancellationException.get()) - { - _cancellationHandler = handler; - return; - } - } - handler->asyncRequestCanceled(OutgoingAsyncBasePtr::dynamicCast(this), *_cancellationException.get()); -} - -void -AsyncResult::checkCanceled() -{ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); if(_cancellationException.get()) { - _cancellationException->ice_throw(); + try + { + _cancellationException->ice_throw(); + } + catch(const Ice::Exception&) + { + _cancellationException.reset(0); + throw; + } } + _cancellationHandler = handler; } void |