ARTEMIS-1186 Consumer.receive hangs if http acceptor with non-zero batch-delay 
is configured


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/bf814d48
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/bf814d48
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/bf814d48

Branch: refs/heads/1.x
Commit: bf814d486421425d651c8bf412a0e084ed0c09dd
Parents: 0f40671
Author: Tomas Hofman <[email protected]>
Authored: Mon May 29 12:00:32 2017 +0200
Committer: Clebert Suconic <[email protected]>
Committed: Wed May 31 11:42:10 2017 -0400

----------------------------------------------------------------------
 .../artemis/core/remoting/impl/netty/NettyAcceptor.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bf814d48/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
index df08108..89a1ccc 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
@@ -340,13 +340,13 @@ public class NettyAcceptor extends AbstractAcceptor {
             notificationService.sendNotification(notification);
          }
 
-         if (batchDelay > 0) {
-            flusher = new BatchFlusher();
+         ActiveMQServerLogger.LOGGER.startedAcceptor(host, port, 
protocolsString);
+      }
 
-            batchFlusherFuture = 
scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, 
TimeUnit.MILLISECONDS);
-         }
+      if (batchDelay > 0) {
+         flusher = new BatchFlusher();
 
-         ActiveMQServerLogger.LOGGER.startedAcceptor(host, port, 
protocolsString);
+         batchFlusherFuture = 
scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, 
TimeUnit.MILLISECONDS);
       }
    }
 

Reply via email to