diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-11-24 18:22:03 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-11-24 18:22:03 +0100 |
commit | 4900e45ceadf8b1acd435a6e7b9423e5fa09ebc9 (patch) | |
tree | e7b63106ecd3290a9c6eb829d47dc63530c3ec79 /cpp/src | |
parent | ICE-5963 - Fix C# Glacier2/sessionHelper /w ssl test failure (diff) | |
download | ice-4900e45ceadf8b1acd435a6e7b9423e5fa09ebc9.tar.bz2 ice-4900e45ceadf8b1acd435a6e7b9423e5fa09ebc9.tar.xz ice-4900e45ceadf8b1acd435a6e7b9423e5fa09ebc9.zip |
Fixed ICE-5969: IceGrid/allocation test failure
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index ae7f9d37c36..ddcbea13f11 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -552,17 +552,6 @@ Ice::ConnectionI::monitor(const IceUtil::Time& now, const ACMConfig& acm) } assert(acm.timeout != IceUtil::Time()); - if(static_cast<Int>(_readStream.b.size()) > headerSize || !_writeStream.b.empty()) - { - // - // If writing or reading, nothing to do, the connection - // timeout will kick-in if writes or reads don't progress. - // This check is necessary because the actitivy timer is - // only set when a message is fully read/written. - // - return; - } - // // We send a heartbeat if there was no activity in the last // (timeout / 4) period. Sending a heartbeat sooner than really @@ -575,9 +564,8 @@ Ice::ConnectionI::monitor(const IceUtil::Time& now, const ACMConfig& acm) // per timeout period because the monitor() method is sill only // called every (timeout / 2) period. // - if(acm.heartbeat == HeartbeatAlways || - (acm.heartbeat != HeartbeatOff && now >= (_acmLastActivity + acm.timeout / 4))) + (acm.heartbeat != HeartbeatOff && _writeStream.b.empty() && now >= (_acmLastActivity + acm.timeout / 4))) { if(acm.heartbeat != HeartbeatOnInvocation || _dispatchCount > 0) { @@ -585,6 +573,17 @@ Ice::ConnectionI::monitor(const IceUtil::Time& now, const ACMConfig& acm) } } + if(static_cast<Int>(_readStream.b.size()) > headerSize || !_writeStream.b.empty()) + { + // + // If writing or reading, nothing to do, the connection + // timeout will kick-in if writes or reads don't progress. + // This check is necessary because the actitivy timer is + // only set when a message is fully read/written. + // + return; + } + if(acm.close != CloseOff && now >= (_acmLastActivity + acm.timeout)) { if(acm.close == CloseOnIdleForceful || |