From b185c006a0e176058d06fa296b7a1e94d8692dbb Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 6 Aug 2007 15:02:36 +0000 Subject: Send flush after get request. Fixes perftest. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@563163 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ClientChannel.cpp | 2 ++ cpp/src/qpid/client/Response.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/client/ClientChannel.cpp b/cpp/src/qpid/client/ClientChannel.cpp index 9eca2903cc..424ff97ea1 100644 --- a/cpp/src/qpid/client/ClientChannel.cpp +++ b/cpp/src/qpid/client/ClientChannel.cpp @@ -220,7 +220,9 @@ void Channel::cancel(const std::string& tag, bool synch) { bool Channel::get(Message& msg, const Queue& queue, AckMode ackMode) { AMQMethodBody::shared_ptr request(new BasicGetBody(version, 0, queue.getName(), ackMode)); + Response response = session->send(request, true); + session->flush(); if (response.isA()) { return false; } else { diff --git a/cpp/src/qpid/client/Response.h b/cpp/src/qpid/client/Response.h index f44cd72783..425d78e7cd 100644 --- a/cpp/src/qpid/client/Response.h +++ b/cpp/src/qpid/client/Response.h @@ -43,7 +43,8 @@ public: } template bool isA() { - return future->getResponse()->isA(); + framing::AMQMethodBody::shared_ptr response(future->getResponse()); + return response && response->isA(); } void sync() -- cgit v1.2.1