diff --git a/broker/src/main/java/io/moquette/broker/Session.java b/broker/src/main/java/io/moquette/broker/Session.java index 146692d58..49f381d53 100644 --- a/broker/src/main/java/io/moquette/broker/Session.java +++ b/broker/src/main/java/io/moquette/broker/Session.java @@ -392,6 +392,7 @@ private void drainQueueToConnection() { } inflightSlots.decrementAndGet(); int sendPacketId = mqttConnection.nextPacketId(); + inflightTimeouts.add(new InFlightPacket(sendPacketId, FLIGHT_BEFORE_RESEND_MS)); // Putting it in a map, but the retain is cancelled out by the below release. EnqueuedMessage old = inflightWindow.put(sendPacketId, msg);