mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
Use ackedStanzasCount instead of handledCount in processHandledCount
for the initial size of the ackedStanzas list. Thanks to Juan Antonio for reporting.
This commit is contained in:
parent
9c9d1f893a
commit
cc758b8f59
1 changed files with 1 additions and 1 deletions
|
@ -1758,7 +1758,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…
Reference in a new issue