diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/SessionState.cpp | 4 | ||||
-rw-r--r-- | cpp/src/tests/SessionState.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/SessionState.cpp b/cpp/src/qpid/SessionState.cpp index 28e433b911..4b4e79801f 100644 --- a/cpp/src/qpid/SessionState.cpp +++ b/cpp/src/qpid/SessionState.cpp @@ -110,13 +110,13 @@ void SessionState::senderRecord(const AMQFrame& f) { if (isControl(f)) return; // Ignore control frames. QPID_LOG_IF(debug, f.getMethod(), getId() << ": sent cmd " << sender.sendPoint.command << ": " << *f.getMethod()); stateful = true; - sender.replayList.push_back(f); + if (timeout) sender.replayList.push_back(f); sender.unflushedSize += f.size(); sender.replaySize += f.size(); sender.incomplete += sender.sendPoint.command; sender.sendPoint.advance(f); if (config.replayHardLimit && config.replayHardLimit < sender.replaySize) - throw ResourceLimitExceededException("Replay bufffer exceeeded hard limit"); + throw ResourceLimitExceededException("Replay buffer exceeeded hard limit"); } bool SessionState::senderNeedFlush() const { diff --git a/cpp/src/tests/SessionState.cpp b/cpp/src/tests/SessionState.cpp index 43b949cfff..51259bac2b 100644 --- a/cpp/src/tests/SessionState.cpp +++ b/cpp/src/tests/SessionState.cpp @@ -127,6 +127,7 @@ using qpid::SessionPoint; QPID_AUTO_TEST_CASE(testSendGetReplyList) { qpid::SessionState s; + s.setTimeout(1); s.senderGetCommandPoint(); transfer1(s, "abc"); transfers(s, "def"); @@ -142,6 +143,7 @@ QPID_AUTO_TEST_CASE(testNeedFlush) { // sync after 2 1-byte transfers or equivalent bytes. c.replayFlushLimit = 2*(transferFrameSize()+contentFrameSize()); qpid::SessionState s(SessionId(), c); + s.setTimeout(1); s.senderGetCommandPoint(); transfers(s, "a"); BOOST_CHECK(!s.senderNeedFlush()); @@ -161,6 +163,7 @@ QPID_AUTO_TEST_CASE(testPeerConfirmed) { // sync after 2 1-byte transfers or equivalent bytes. c.replayFlushLimit = 2*(transferFrameSize()+contentFrameSize()); qpid::SessionState s(SessionId(), c); + s.setTimeout(1); s.senderGetCommandPoint(); transfers(s, "ab"); BOOST_CHECK(s.senderNeedFlush()); @@ -191,6 +194,7 @@ QPID_AUTO_TEST_CASE(testPeerConfirmed) { QPID_AUTO_TEST_CASE(testPeerCompleted) { qpid::SessionState s; + s.setTimeout(1); s.senderGetCommandPoint(); // Completion implies confirmation transfers(s, "abc"); |