summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/LocalQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.cpp')
-rw-r--r--cpp/src/qpid/client/LocalQueue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp
index 229d3766ef..e449c9f795 100644
--- a/cpp/src/qpid/client/LocalQueue.cpp
+++ b/cpp/src/qpid/client/LocalQueue.cpp
@@ -33,12 +33,12 @@ using namespace framing;
LocalQueue::LocalQueue() {}
LocalQueue::~LocalQueue() {}
-Message LocalQueue::pop() { return get(); }
+Message LocalQueue::pop(sys::Duration timeout) { return get(timeout); }
-Message LocalQueue::get() {
+Message LocalQueue::get(sys::Duration timeout) {
Message result;
- bool ok = get(result, sys::TIME_INFINITE);
- assert(ok); (void) ok;
+ bool ok = get(result, timeout);
+ if (!ok) throw Exception("Timed out waiting for a message");
return result;
}