summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/AsyncResult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/AsyncResult.cpp')
-rw-r--r--cpp/src/Ice/AsyncResult.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/Ice/AsyncResult.cpp b/cpp/src/Ice/AsyncResult.cpp
index dc1b5689339..f1829b06ef3 100644
--- a/cpp/src/Ice/AsyncResult.cpp
+++ b/cpp/src/Ice/AsyncResult.cpp
@@ -406,6 +406,7 @@ AsyncResult::invokeCompleted()
void
AsyncResult::cancel(const Ice::LocalException& ex)
{
+ CancellationHandlerPtr handler;
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
_cancellationException.reset(ex.ice_clone());
@@ -413,8 +414,9 @@ AsyncResult::cancel(const Ice::LocalException& ex)
{
return;
}
+ handler = _cancellationHandler;
}
- _cancellationHandler->asyncRequestCanceled(OutgoingAsyncBasePtr::dynamicCast(this), ex);
+ handler->asyncRequestCanceled(OutgoingAsyncBasePtr::dynamicCast(this), ex);
}
void