ARTEMIS-2385 Log header for rejecting message with too large header
Fix test and warning condition to avoid false issues.
This commit is contained in:
parent
f6e72504ad
commit
d14c0de335
|
@ -196,8 +196,11 @@ public class AMQPConnectionContext extends ProtonInitializable implements EventH
|
|||
|
||||
if (scheduledPool != null && scheduledPool instanceof ThreadPoolExecutor &&
|
||||
scheduledFuture != null && scheduledFuture instanceof Runnable) {
|
||||
if (!((ThreadPoolExecutor) scheduledPool).remove((Runnable) scheduledFuture)) {
|
||||
if (!((ThreadPoolExecutor) scheduledPool).remove((Runnable) scheduledFuture) &&
|
||||
!scheduledFuture.isCancelled() && !scheduledFuture.isDone()) {
|
||||
log.warn("Scheduled task can't be removed from scheduledPool.");
|
||||
} else {
|
||||
scheduledFuture = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,6 +81,6 @@ public class AMQPConnectionContextTest {
|
|||
|
||||
connectionContext.close(null);
|
||||
|
||||
Assert.assertEquals(0, scheduledPool.getTaskCount());
|
||||
Assert.assertEquals(0, scheduledPool.getQueue().size());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue