Skip to content

Commit 05b2961

Browse files
author
Alexandru Scvortov
committed
inline function
1 parent 434f9f9 commit 05b2961

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/src/com/rabbitmq/examples/MulticastMain.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ public void handleAck(long seqNo, boolean multiple) {
300300
ackSet.remove(seqNo);
301301
numConfirms = 1;
302302
}
303-
addConfirms(numConfirms);
303+
synchronized (this) {
304+
confirmCount += numConfirms;
305+
}
304306

305307
if (confirmPool != null) {
306308
for (int i = 0; i < numConfirms; ++i) {
@@ -309,10 +311,6 @@ public void handleAck(long seqNo, boolean multiple) {
309311
}
310312
}
311313

312-
private synchronized void addConfirms(int numConfirms) {
313-
confirmCount += numConfirms;
314-
}
315-
316314
public synchronized void resetCounts() {
317315
msgCount = 0;
318316
returnCount = 0;

0 commit comments

Comments
 (0)