mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4540 - wait for a max of 30 seconds for pending forwards to complete
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1483605 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6f124c16f7
commit
3ded22df3d
|
@ -18,6 +18,7 @@ package org.apache.activemq.network;
|
|||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
|
@ -101,13 +102,13 @@ public class DemandSubscription {
|
|||
if (dispatched.get() > 0) {
|
||||
synchronized (activeWaiter) {
|
||||
try {
|
||||
activeWaiter.wait();
|
||||
activeWaiter.wait(TimeUnit.SECONDS.toMillis(30));
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
}
|
||||
if (this.dispatched.get() > 0) {
|
||||
LOG.warn("demand sub interrupted or timedout while waiting for outstanding responses, " +
|
||||
"expect potentially " + this.dispatched.get() + " duplicate deliveried");
|
||||
"expect potentially " + this.dispatched.get() + " duplicate forwards");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue