YxAc commented on code in PR #63:
URL: https://github.com/apache/rocketmq-mqtt/pull/63#discussion_r846792301


##########
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/protocol/mqtt/handler/MqttConnectHandler.java:
##########
@@ -73,17 +69,15 @@ public void doHandler(ChannelHandlerContext ctx, 
MqttConnectMessage connectMessa
         if (!upstreamHookResult.isSuccess()) {
             byte connAckCode = (byte) upstreamHookResult.getSubCode();
             MqttConnectReturnCode mqttConnectReturnCode = 
MqttConnectReturnCode.valueOf(connAckCode);
-            if (mqttConnectReturnCode == null) {
-                channelManager.closeConnect(channel, ChannelCloseFrom.SERVER, 
remark);
-                return;
-            }
             
channel.writeAndFlush(getMqttConnAckMessage(mqttConnectReturnCode));
             channelManager.closeConnect(channel, ChannelCloseFrom.SERVER, 
remark);
             return;
         }
 
         CompletableFuture<Void> future = new CompletableFuture<>();
         ChannelInfo.setFuture(channel, ChannelInfo.FUTURE_CONNECT, future);
+
+        // use 'scheduler' to separate two i/o: 'ack to client' and 
'session-load from rocketmq'

Review Comment:
   add some comment



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to