Commit 56ac5211 authored by Dmitry Deshevoy's avatar Dmitry Deshevoy Committed by akrherz

Set correct sequence number in the <resumed/> element

According to XEP-0198 'h' attribute should be set to the sequence number
of the last handled stanza sent over the former stream from the client to the server
parent 04628004
......@@ -442,7 +442,7 @@ public class StreamManager {
Log.debug("Agreeing to resume");
Element resumed = new DOMElement(QName.get("resumed", namespace));
resumed.addAttribute("previd", StringUtils.encodeBase64( session.getAddress().getResource() + "\0" + session.getStreamID().getID()));
resumed.addAttribute("h", Long.toString(clientProcessedStanzas));
resumed.addAttribute("h", Long.toString(serverProcessedStanzas));
session.getConnection().deliverRawText(resumed.asXML());
Log.debug("Resuming session: Ack for {}", h);
processClientAcknowledgement(h);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment