Commit c8269f66 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1028: Don't forget to register client ack.

parent 1a1efa27
...@@ -47,12 +47,6 @@ public class StreamManager { ...@@ -47,12 +47,6 @@ public class StreamManager {
*/ */
private final Connection connection; private final Connection connection;
/**
* Whether Stream Management is enabled for session
* the manager belongs to.
*/
private boolean enabled;
/** /**
* Namespace to be used in stanzas sent to client (depending on XEP-0198 version used by client) * Namespace to be used in stanzas sent to client (depending on XEP-0198 version used by client)
*/ */
...@@ -101,7 +95,6 @@ public class StreamManager { ...@@ -101,7 +95,6 @@ public class StreamManager {
{ {
switch(element.getName()) { switch(element.getName()) {
case "enable": case "enable":
enable( onBehalfOf, element.getNamespace().getStringValue() ); enable( onBehalfOf, element.getNamespace().getStringValue() );
break; break;
case "r": case "r":
...@@ -190,9 +183,10 @@ public class StreamManager { ...@@ -190,9 +183,10 @@ public class StreamManager {
if ( !unacknowledgedServerStanzas.isEmpty() && h > unacknowledgedServerStanzas.getLast().x ) { if ( !unacknowledgedServerStanzas.isEmpty() && h > unacknowledgedServerStanzas.getLast().x ) {
Log.warn( "Client acknowledges stanzas that we didn't sent! Client Ack h: {}, our last stanza: {}", h, unacknowledgedServerStanzas.getLast().x ); Log.warn( "Client acknowledges stanzas that we didn't sent! Client Ack h: {}, our last stanza: {}", h, unacknowledgedServerStanzas.getLast().x );
clientProcessedStanzas = h; // Correct the bookkeeping on our end.
} }
clientProcessedStanzas = h;
// Remove stanzas from temporary storage as now acknowledged // Remove stanzas from temporary storage as now acknowledged
Log.trace( "Before processing client Ack (h={}): {} unacknowledged stanzas.", h, unacknowledgedServerStanzas.size() ); Log.trace( "Before processing client Ack (h={}): {} unacknowledged stanzas.", h, unacknowledgedServerStanzas.size() );
...@@ -214,7 +208,7 @@ public class StreamManager { ...@@ -214,7 +208,7 @@ public class StreamManager {
} }
} }
Log.trace("After processing client Ack (h={}): {} unacknowledged stanzas.", h, unacknowledgedServerStanzas.size()); Log.trace( "After processing client Ack (h={}): {} unacknowledged stanzas.", h, unacknowledgedServerStanzas.size());
} }
} }
} }
...@@ -272,7 +266,6 @@ public class StreamManager { ...@@ -272,7 +266,6 @@ public class StreamManager {
delayInformation.addAttribute("stamp", XMPPDateTimeFormat.format(unacked.timestamp)); delayInformation.addAttribute("stamp", XMPPDateTimeFormat.format(unacked.timestamp));
delayInformation.addAttribute("from", serverAddress.toBareJID()); delayInformation.addAttribute("from", serverAddress.toBareJID());
} }
}
router.route(unacked.packet); router.route(unacked.packet);
} }
} }
......
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