summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-06-03 16:04:43 +0000
committerGordon Sim <gsim@apache.org>2011-06-03 16:04:43 +0000
commite0227cc4cfd9d8979758b7c2aea485b4bf20f4ed (patch)
treebfa1ff3757deb0eb69e49134a9498afe0b3f2cc4 /cpp/src
parent260a9b18485b27bda8c6d2c1fd1a329b6a89dbb0 (diff)
downloadqpid-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.cpp2
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
}
}
}