From 364b62744a35f7e48332af00217a1848345cd39a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 30 Oct 2008 21:07:28 +0000 Subject: Replicate session state for un-acknowledged messages to new cluster members. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@709242 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/LocalQueue.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/client/LocalQueue.cpp') 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; } -- cgit v1.2.1