From c4c9cf2e9497de13f37270e7f21250448a750427 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Thu, 26 Jan 2012 22:18:59 +0000 Subject: [PATCH] fix for: https://issues.apache.org/jira/browse/AMQ-3683 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1236414 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/transport/AbstractInactivityMonitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java b/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java index 9ccda1d0da..8f2058d0ec 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/AbstractInactivityMonitor.java @@ -135,7 +135,7 @@ public abstract class AbstractInactivityMonitor extends TransportFilter { return; } - if (!commandSent.get() && useKeepAlive) { + if (!commandSent.get() && useKeepAlive && monitorStarted.get() && !ASYNC_TASKS.isTerminating()) { if (LOG.isTraceEnabled()) { LOG.trace(this + " no message sent since last write check, sending a KeepAliveInfo"); } @@ -178,7 +178,7 @@ public abstract class AbstractInactivityMonitor extends TransportFilter { } return; } - if (!commandReceived.get()) { + if (!commandReceived.get() && monitorStarted.get() && !ASYNC_TASKS.isTerminating()) { if (LOG.isDebugEnabled()) { LOG.debug("No message received since last read check for " + toString() + "! Throwing InactivityIOException."); }