diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-07-15 10:22:40 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-07-15 10:22:40 +0200 |
commit | 710a9221852d6c92b1727a429a33b38f1f949352 (patch) | |
tree | 6bc9ac9ed04a6b1858d8fc30282d4f18ef04abbb /cpp/src/Ice/Outgoing.cpp | |
parent | - Fix for ICE-5578 - Python build failure (diff) | |
download | ice-710a9221852d6c92b1727a429a33b38f1f949352.tar.bz2 ice-710a9221852d6c92b1727a429a33b38f1f949352.tar.xz ice-710a9221852d6c92b1727a429a33b38f1f949352.zip |
Fixed collocation optimization to use the dispatcher, minor test fixes
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 0e89e524a0a..fce704f0fe9 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -293,16 +293,30 @@ IceInternal::Outgoing::sent() } void -IceInternal::Outgoing::finished(const Exception& ex, bool sent) +IceInternal::Outgoing::finished(const Exception& ex) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); - assert(_state <= StateInProgress); + //assert(_state <= StateInProgress); + if(_state > StateInProgress) + { + // + // Response was already received but message + // didn't get removed first from the connection + // send message queue so it's possible we can be + // notified of failures. In this case, ignore the + // failure and assume the outgoing has been sent. + // + assert(_state != StateFailed); + _sent = true; + _monitor.notify(); + return; + } + _childObserver.failed(ex.ice_name()); _childObserver.detach(); _state = StateFailed; _exception.reset(ex.ice_clone()); - _sent = sent; _monitor.notify(); } @@ -628,7 +642,7 @@ IceInternal::BatchOutgoing::sent() } void -IceInternal::BatchOutgoing::finished(const Ice::Exception& ex, bool) +IceInternal::BatchOutgoing::finished(const Ice::Exception& ex) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); _childObserver.failed(ex.ice_name()); |