codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] activemq-artemis pull request #2467: ARTEMIS-2205 Performance improvements o...


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

    https://github.com/apache/activemq-artemis/pull/2467#discussion_r242686500
  
    --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java ---
    @@ -119,10 +119,15 @@ public boolean isDestroyed() {
     
        @Override
        public void disconnect(boolean criticalError) {
    -      ErrorCondition errorCondition = new ErrorCondition();
    -      errorCondition.setCondition(AmqpSupport.CONNECTION_FORCED);
    -      amqpConnection.close(errorCondition);
    -      getTransportConnection().close();
    +      amqpConnection.runLater(() -> {
    +         ErrorCondition errorCondition = new ErrorCondition();
    +         errorCondition.setCondition(AmqpSupport.CONNECTION_FORCED);
    +         amqpConnection.close(errorCondition);
    +         amqpConnection.flush();
    +      });
    +      amqpConnection.runLater(() -> {
    --- End diff --
    
    Probably it is a naive question, but why 2 separate runLater calls instead of one?


---