YxAc commented on code in PR #91:
URL: https://github.com/apache/rocketmq-mqtt/pull/91#discussion_r868072868
##########
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/session/loop/SessionLoopImpl.java:
##########
@@ -275,11 +275,11 @@ private void addSubscriptionAndInit(Session session,
Set<Subscription> subscript
return;
}
session.addSubscription(subscriptions);
- AtomicInteger result = new AtomicInteger(subscriptions.size());
for (Subscription subscription : subscriptions) {
queueFresh.freshQueue(session, subscription);
Map<Queue, QueueOffset> queueOffsets =
session.getQueueOffset(subscription);
if (queueOffsets != null) {
+ AtomicInteger result = new AtomicInteger(queueOffsets.size());
for (Map.Entry<Queue, QueueOffset> entry :
queueOffsets.entrySet()) {
Review Comment:
Do we really need the 'result' variable?
we just need to judge whether the future is complete or not, and only
complete once?
--
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]