activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tabish121 <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1925: ARTEMIS-1727 - Make sure transport is s...
Date Fri, 02 Mar 2018 18:03:02 GMT
Github user tabish121 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1925#discussion_r171918979
  
    --- Diff: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
---
    @@ -641,13 +647,37 @@ public void fail(ActiveMQException me, String message) {
              }
           }
           try {
    -         protocolManager.removeConnection(this.getConnectionInfo(), me);
    +         if (this.getConnectionInfo() != null) {
    +            protocolManager.removeConnection(this.getConnectionInfo(), me);
    +         }
           } catch (InvalidClientIDException e) {
              ActiveMQServerLogger.LOGGER.warn("Couldn't close connection because invalid
clientID", e);
           }
           shutdown(true);
        }
     
    +   private void delayedStop(final int waitTime, final String reason, Throwable cause)
{
    +      if (waitTime > 0) {
    +         try {
    +            server.getExecutorFactory().getExecutor().execute(new Runnable() {
    +               @Override
    +               public void run() {
    +                  try {
    +                     Thread.sleep(waitTime);
    --- End diff --
    
    Sleeping here seems like it might have a ripple on the other resources using the executor,
maybe use a scheduled executor from the pool in ActiveMQServer ?


---

Mime
View raw message