summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-07-10 08:39:10 +0000
committerGordon Sim <gsim@apache.org>2008-07-10 08:39:10 +0000
commitf8078da6c6617ce5359fa90feca93e191c6c014f (patch)
tree252b412803448a2f2396d33f02c492a61f6975ce /cpp/src/qpid
parent884c89d1aa056e89ab365108d418bdaee5745368 (diff)
downloadqpid-python-f8078da6c6617ce5359fa90feca93e191c6c014f.tar.gz
Honour timeout in BlockingQueue::pop(); added test for SubscriptionManager::get() where no message exists.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@675477 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/sys/BlockingQueue.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/BlockingQueue.h b/cpp/src/qpid/sys/BlockingQueue.h
index 9bb215ff7f..4402c242e6 100644
--- a/cpp/src/qpid/sys/BlockingQueue.h
+++ b/cpp/src/qpid/sys/BlockingQueue.h
@@ -52,7 +52,7 @@ public:
{
Waitable::ScopedWait w(waitable);
AbsTime deadline(now(),timeout);
- while (queue.empty()) waitable.wait(deadline);
+ while (queue.empty() && deadline > now()) waitable.wait(deadline);
}
if (queue.empty()) return false;
result = queue.front();