From d1f99cede240ade9532da4fe5061a177c5c63f33 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 4 Jun 2008 16:00:17 +0000 Subject: Increased default flush interval to 1MB, send spontaneous known-completed at the flush interval. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@663271 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/amqp_0_10/SessionHandler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/amqp_0_10/SessionHandler.cpp') 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) { -- cgit v1.2.1