mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +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 {
|
private void processHandledCount(long handledCount) throws StreamManagementCounterError {
|
||||||
long ackedStanzasCount = SMUtils.calculateDelta(handledCount, serverHandledStanzasCount);
|
long ackedStanzasCount = SMUtils.calculateDelta(handledCount, serverHandledStanzasCount);
|
||||||
final List<Stanza> ackedStanzas = new ArrayList<Stanza>(
|
final List<Stanza> ackedStanzas = new ArrayList<Stanza>(
|
||||||
handledCount <= Integer.MAX_VALUE ? (int) handledCount
|
ackedStanzasCount <= Integer.MAX_VALUE ? (int) ackedStanzasCount
|
||||||
: Integer.MAX_VALUE);
|
: Integer.MAX_VALUE);
|
||||||
for (long i = 0; i < ackedStanzasCount; i++) {
|
for (long i = 0; i < ackedStanzasCount; i++) {
|
||||||
Stanza ackedStanza = unacknowledgedStanzas.poll();
|
Stanza ackedStanza = unacknowledgedStanzas.poll();
|
||||||
|
|
Loading…
Reference in a new issue