summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp4
-rw-r--r--qpid/cpp/src/qpid/messaging/Session.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 1086146b0d..6d98527627 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -97,7 +97,7 @@ void SessionImpl::acknowledge(bool sync_)
//message may be redelivered; i.e. the application cannot delete
//any state necessary for preventing reprocessing of the message
execute<Acknowledge>();
- if (sync_) sync(true);
+ sync(sync_);
}
void SessionImpl::reject(qpid::messaging::Message& m)
@@ -433,6 +433,8 @@ void SessionImpl::syncImpl(bool block)
{
if (block) session.sync();
else session.flush();
+ //cleanup unconfirmed accept records:
+ incoming.pendingAccept();
}
void SessionImpl::commitImpl()
diff --git a/qpid/cpp/src/qpid/messaging/Session.cpp b/qpid/cpp/src/qpid/messaging/Session.cpp
index f07fad434e..496953a8e5 100644
--- a/qpid/cpp/src/qpid/messaging/Session.cpp
+++ b/qpid/cpp/src/qpid/messaging/Session.cpp
@@ -39,7 +39,7 @@ Session& Session::operator=(const Session& s) { return PI::assign(*this, s); }
void Session::commit() { impl->commit(); }
void Session::rollback() { impl->rollback(); }
void Session::acknowledge(bool sync) { impl->acknowledge(sync); }
-void Session::acknowledge(Message& m, bool s) { impl->acknowledge(m); if (s) sync(true); }
+void Session::acknowledge(Message& m, bool s) { impl->acknowledge(m); sync(s); }
void Session::reject(Message& m) { impl->reject(m); }
void Session::release(Message& m) { impl->release(m); }
void Session::close() { impl->close(); }