Skip to content

Commit

Permalink
Fix qos1 pubAck action is not executed forever when log level is not …
Browse files Browse the repository at this point in the history
…debug (#69) (#83) (#84)
  • Loading branch information
Technoboy- authored Aug 16, 2021
1 parent de2e003 commit 7cd2fd3
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ public void processConnect(Channel channel, MqttConnectMessage msg) {
public void processPubAck(Channel channel, MqttPubAckMessage msg) {
if (log.isDebugEnabled()) {
log.debug("[PubAck] [{}] msg: {}", channel, msg);
int packetId = msg.variableHeader().messageId();
OutstandingPacket packet = outstandingPacketContainer.remove(packetId);
if (packet != null) {
packet.getConsumer().getSubscription().acknowledgeMessage(
Collections.singletonList(PositionImpl.get(packet.getLedgerId(), packet.getEntryId())),
CommandAck.AckType.Individual, Collections.emptyMap());
packet.getConsumer().getPendingAcks().remove(packet.getLedgerId(), packet.getEntryId());
packet.getConsumer().incrementPermits();
}
}
int packetId = msg.variableHeader().messageId();
OutstandingPacket packet = outstandingPacketContainer.remove(packetId);
if (packet != null) {
packet.getConsumer().getSubscription().acknowledgeMessage(
Collections.singletonList(PositionImpl.get(packet.getLedgerId(), packet.getEntryId())),
CommandAck.AckType.Individual, Collections.emptyMap());
packet.getConsumer().getPendingAcks().remove(packet.getLedgerId(), packet.getEntryId());
packet.getConsumer().incrementPermits();
}
}

Expand Down

0 comments on commit 7cd2fd3

Please sign in to comment.