diff options
| author | Gordon Sim <gsim@apache.org> | 2007-08-06 15:02:36 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-08-06 15:02:36 +0000 |
| commit | e800aa48a01046f5748e512e70f42308fe0dc8c3 (patch) | |
| tree | 9ddbde5c71b728139cad3c9cb5a32f4f3024118d /qpid/cpp/src | |
| parent | c65cef89443a42c87e17d8d24b176b49344c896e (diff) | |
| download | qpid-python-e800aa48a01046f5748e512e70f42308fe0dc8c3.tar.gz | |
Send flush after get request. Fixes perftest.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@563163 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/client/ClientChannel.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/client/Response.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/client/ClientChannel.cpp b/qpid/cpp/src/qpid/client/ClientChannel.cpp index 9eca2903cc..424ff97ea1 100644 --- a/qpid/cpp/src/qpid/client/ClientChannel.cpp +++ b/qpid/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<BasicGetEmptyBody>()) { return false; } else { diff --git a/qpid/cpp/src/qpid/client/Response.h b/qpid/cpp/src/qpid/client/Response.h index f44cd72783..425d78e7cd 100644 --- a/qpid/cpp/src/qpid/client/Response.h +++ b/qpid/cpp/src/qpid/client/Response.h @@ -43,7 +43,8 @@ public: } template <class T> bool isA() { - return future->getResponse()->isA<T>(); + framing::AMQMethodBody::shared_ptr response(future->getResponse()); + return response && response->isA<T>(); } void sync() |
