diff options
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 64d9bb248c2..d6d09d1271a 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -357,6 +357,11 @@ IceInternal::Outgoing::sent(bool notify) // _sent = true; } + + if(_handler->getReference()->getMode() != Reference::ModeTwoway) + { + _remoteObserver.detach(); + } } void @@ -367,6 +372,7 @@ IceInternal::Outgoing::finished(BasicStream& is) assert(_handler->getReference()->getMode() == Reference::ModeTwoway); // Can only be called for twoways. assert(_state <= StateInProgress); + _remoteObserver.detach(); _is.swap(is); Byte replyStatus; @@ -518,6 +524,8 @@ IceInternal::Outgoing::finished(const LocalException& ex, bool sent) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); assert(_state <= StateInProgress); + _remoteObserver.detach(); + _state = StateFailed; _exception.reset(dynamic_cast<LocalException*>(ex.ice_clone())); _sent = sent; |