diff options
Diffstat (limited to 'cpp/src/qpid/amqp_0_10/SessionHandler.cpp')
-rw-r--r-- | cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp index 0d1cc57072..53f847a3cf 100644 --- a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp +++ b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp @@ -196,11 +196,13 @@ void SessionHandler::confirmed(const SequenceSet& commands, const Array& /*fragm getState()->senderConfirmed(commands.rangesBegin()->last()); } -void SessionHandler::completed(const SequenceSet& commands, bool /*timelyReply*/) { +void SessionHandler::completed(const SequenceSet& commands, bool timelyReply) { checkAttached(); getState()->senderCompleted(commands); - if (!commands.empty()) - peer.knownCompleted(commands); // Always send a timely reply + if (getState()->senderNeedKnownCompleted() || timelyReply) { + peer.knownCompleted(commands); + getState()->senderRecordKnownCompleted(); + } } void SessionHandler::knownCompleted(const SequenceSet& commands) { |