summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/SessionHandler.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionHandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/SessionHandler.cpp b/cpp/src/qpid/broker/SessionHandler.cpp
index 0dafcba7bd..f72c52c809 100644
--- a/cpp/src/qpid/broker/SessionHandler.cpp
+++ b/cpp/src/qpid/broker/SessionHandler.cpp
@@ -38,8 +38,7 @@ SessionHandler::SessionHandler(Connection& c, ChannelId ch)
connection(c), channel(ch, &c.getOutput()),
proxy(out), // Via my own handleOut() for L2 data.
peerSession(channel), // Direct to channel for L2 commands.
- ignoring(false),
- resuming(false) {}
+ ignoring(false) {}
SessionHandler::~SessionHandler() {}
@@ -117,8 +116,7 @@ void SessionHandler::resume(const Uuid& id) {
assertClosed("resume");
session = connection.broker.getSessionManager().resume(id);
session->attach(*this);
- resuming=true;
- SequenceNumber seq = session->sendingAck();
+ SequenceNumber seq = session->resuming();
peerSession.attached(session->getId(), session->getTimeout());
proxy.getSession().ack(seq, SequenceNumberSet());
}
@@ -171,8 +169,7 @@ void SessionHandler::ack(uint32_t cumulativeSeenMark,
const SequenceNumberSet& /*seenFrameSet*/)
{
assertAttached("ack");
- if (resuming) {
- resuming=false;
+ if (session->getState() == SessionState::RESUMING) {
session->receivedAck(cumulativeSeenMark);
framing::SessionState::Replay replay=session->replay();
std::for_each(replay.begin(), replay.end(),