[ 
https://issues.apache.org/jira/browse/ARTEMIS-2686?focusedWorklogId=414521&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414521
 ]

ASF GitHub Bot logged work on ARTEMIS-2686:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Apr/20 08:04
            Start Date: 02/Apr/20 08:04
    Worklog Time Spent: 10m 
      Work Description: franz1981 commented on pull request #3058: ARTEMIS-2686 
Fix MQTT connect message rejection
URL: https://github.com/apache/activemq-artemis/pull/3058#discussion_r402124625
 
 

 ##########
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTRejectingInterceptorTest.java
 ##########
 @@ -61,4 +62,36 @@ public boolean intercept(MqttMessage packet, 
RemotingConnection connection) thro
       subscribeProvider.disconnect();
       publishProvider.disconnect();
    }
+
+   @Test(timeout = 60000)
+   public void testRejectedMqttConnectMessage() throws Exception {
+
+      server.getRemotingService().addIncomingInterceptor((MQTTInterceptor) 
(packet, connection) -> {
+         if (packet.getClass() == MqttConnectMessage.class) {
+            return false;
+         } else {
+            return true;
+         }
+      });
+
+      Thread publishThread = new Thread(() -> {
 
 Review comment:
   We really need to use a separate Thread for this?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 414521)
    Time Spent: 20m  (was: 10m)

> Fix MQTT connect message rejection
> ----------------------------------
>
>                 Key: ARTEMIS-2686
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2686
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker, MQTT
>    Affects Versions: 2.11.0
>            Reporter: Domenico Bruscino
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When an incoming MQTT interceptor rejects a MqttConnectMessage the connection 
> doesn't close and the client gets stuck.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to