Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1534#discussion_r145710804
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
 ---
    @@ -99,9 +101,28 @@ public ProtocolManager getProtocol(String name) {
     
           private final boolean httpEnabled;
     
    +      private ScheduledFuture timeoutFuture;
    +
    +      private int handshakeTimeout;
    +
    +
           ProtocolDecoder(boolean http, boolean httpEnabled) {
              this.http = http;
              this.httpEnabled = httpEnabled;
    +         this.handshakeTimeout = 
ConfigurationHelper.getIntProperty(TransportConstants.NETTY_HANDSHAKE_TIMEOUT, 
TransportConstants.DEFAULT_NETTY_HANDSHAKE_TIMEOUT, 
nettyAcceptor.getConfiguration());
    +      }
    +
    +      @Override
    +      public void channelActive(ChannelHandlerContext ctx) throws 
Exception {
    +         if (handshakeTimeout > 0) {
    +            timeoutFuture = scheduledThreadPool.schedule(new Runnable() {
    +               @Override
    +               public void run() {
    +                  ActiveMQClientLogger.LOGGER.readTimeout();
    --- End diff --
    
    The method should probably be renamed something like handshakeTimeout() in 
addition to being moved to the ActiveMQServerLogger.


---

Reply via email to