diff options
author | Gordon Sim <gsim@apache.org> | 2011-06-03 16:04:43 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2011-06-03 16:04:43 +0000 |
commit | e0227cc4cfd9d8979758b7c2aea485b4bf20f4ed (patch) | |
tree | bfa1ff3757deb0eb69e49134a9498afe0b3f2cc4 /cpp/src | |
parent | 260a9b18485b27bda8c6d2c1fd1a329b6a89dbb0 (diff) | |
download | qpid-python-e0227cc4cfd9d8979758b7c2aea485b4bf20f4ed.tar.gz |
QPID-3291: Applied patch fron Andy Goldstein to ensure that expiration is not lost when adjusting ttl
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1131084 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/Message.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Message.cpp b/cpp/src/qpid/broker/Message.cpp index 763dc55e40..7545e4941f 100644 --- a/cpp/src/qpid/broker/Message.cpp +++ b/cpp/src/qpid/broker/Message.cpp @@ -387,7 +387,7 @@ void Message::adjustTtl() sys::Mutex::ScopedLock l(lock); if (expiration < FAR_FUTURE) { sys::Duration d(sys::AbsTime::now(), getExpiration()); - props->setTtl(int64_t(d) > 0 ? int64_t(d)/1000000 : 1); // convert from ns to ms; set to 1 if expired + props->setTtl(int64_t(d) >= 1000000 ? int64_t(d)/1000000 : 1); // convert from ns to ms; set to 1 if expired } } } |