mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Smack 4.1.5
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJWUjTuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41zp8H/iRB0CtFvxVBFwRpP2HB0Iyc VzdxJTVXgJ7s8V3Us2Gmm0chUvs1wybshIdZ090NX7huZ4F1rWrOP7qt9S4soKgX LNdKTKTTNJ61jktLkG1HjA8yJr1Zu+XFK10Ne8997N9TnhbcVYAhsuTb8SRE8dlE G1Qihe2guJCCnWJhz9bsCXyAFt/fM5rSb/sgs/kXkE1W5bYeMHpFMvqMfab8NPBP fkt/NSxfqLfrRJneynnSwGSvRitDxpfRCcxLktTdDO31eryayIyiQIhaUhFYIGJQ tKx0/7HdCkgdUueBdtoQ/O02rjJ+kYqN2F3CErcIbB//3R6WKNF61XzOY81egYc= =dklO -----END PGP SIGNATURE----- Merge tag '4.1.5' Smack 4.1.5
This commit is contained in:
commit
8dcb3c11ff
4 changed files with 89 additions and 13 deletions
|
@ -1086,16 +1086,17 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
if (!smSessionId.equals(resumed.getPrevId())) {
|
||||
throw new StreamIdDoesNotMatchException(smSessionId, resumed.getPrevId());
|
||||
}
|
||||
// Mark SM as enabled and resumption as successful.
|
||||
smResumedSyncPoint.reportSuccess();
|
||||
smEnabledSyncPoint.reportSuccess();
|
||||
// First, drop the stanzas already handled by the server
|
||||
processHandledCount(resumed.getHandledCount());
|
||||
// Then re-send what is left in the unacknowledged queue
|
||||
List<Stanza> stanzasToResend = new LinkedList<Stanza>();
|
||||
stanzasToResend.addAll(unacknowledgedStanzas);
|
||||
List<Stanza> stanzasToResend = new ArrayList<>(unacknowledgedStanzas.size());
|
||||
unacknowledgedStanzas.drainTo(stanzasToResend);
|
||||
for (Stanza stanza : stanzasToResend) {
|
||||
packetWriter.sendStreamElement(stanza);
|
||||
sendStanzaInternal(stanza);
|
||||
}
|
||||
smResumedSyncPoint.reportSuccess();
|
||||
smEnabledSyncPoint.reportSuccess();
|
||||
// If there where stanzas resent, then request a SM ack for them.
|
||||
// Writer's sendStreamElement() won't do it automatically based on
|
||||
// predicates.
|
||||
|
@ -1469,7 +1470,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
*/
|
||||
@Deprecated
|
||||
public static void setUseStreamManagementResumptiodDefault(boolean useSmResumptionDefault) {
|
||||
setUseStreamManagementDefault(useSmResumptionDefault);
|
||||
setUseStreamManagementResumptionDefault(useSmResumptionDefault);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1765,7 +1766,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
private void processHandledCount(long handledCount) throws StreamManagementCounterError {
|
||||
long ackedStanzasCount = SMUtils.calculateDelta(handledCount, serverHandledStanzasCount);
|
||||
final List<Stanza> ackedStanzas = new ArrayList<Stanza>(
|
||||
handledCount <= Integer.MAX_VALUE ? (int) handledCount
|
||||
ackedStanzasCount <= Integer.MAX_VALUE ? (int) ackedStanzasCount
|
||||
: Integer.MAX_VALUE);
|
||||
for (long i = 0; i < ackedStanzasCount; i++) {
|
||||
Stanza ackedStanza = unacknowledgedStanzas.poll();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue