diff options
| author | Gordon Sim <gsim@apache.org> | 2013-11-01 16:55:59 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-11-01 16:55:59 +0000 |
| commit | 0e80c9b2a1bb1f09cd299ae498bd29e46014f211 (patch) | |
| tree | cdc59ce9840900edeaecd40c3ab0604fcbd18bb0 /cpp/src/qpid/messaging/Receiver.cpp | |
| parent | 40850c485859dd3b587428defef3af6d114d2d13 (diff) | |
| download | qpid-python-0e80c9b2a1bb1f09cd299ae498bd29e46014f211.tar.gz | |
QPID-5286: replenish credit when using get
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1537985 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/messaging/Receiver.cpp')
| -rw-r--r-- | cpp/src/qpid/messaging/Receiver.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/messaging/Receiver.cpp b/cpp/src/qpid/messaging/Receiver.cpp index 18670ec068..a2c6b4cade 100644 --- a/cpp/src/qpid/messaging/Receiver.cpp +++ b/cpp/src/qpid/messaging/Receiver.cpp @@ -38,7 +38,11 @@ Receiver::Receiver(ReceiverImpl* impl) { PI::ctor(*this, impl); } Receiver::Receiver(const Receiver& s) : Handle<ReceiverImpl>() { PI::copy(*this, s); } Receiver::~Receiver() { PI::dtor(*this); } Receiver& Receiver::operator=(const Receiver& s) { return PI::assign(*this, s); } -bool Receiver::get(Message& message, Duration timeout) { return impl->get(message, timeout); } +bool Receiver::get(Message& message, Duration timeout) +{ + MessageImplAccess::get(message).clear(); + return impl->get(message, timeout); +} Message Receiver::get(Duration timeout) { return impl->get(timeout); } bool Receiver::fetch(Message& message, Duration timeout) { |
