Skip to content

Commit

Permalink
Fixes after realign to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel committed Jan 22, 2023
1 parent 7392e4e commit e687336
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions broker/src/main/java/io/moquette/broker/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.DelayQueue;
import java.util.concurrent.Delayed;
Expand Down Expand Up @@ -110,19 +109,11 @@ static final class Will {
private final AtomicInteger inflightSlots = new AtomicInteger(INFLIGHT_WINDOW_SIZE); // this should be configurable
private final boolean resendInflightOnTimeout;

Session(String clientId, boolean clean, Will will, SessionMessageQueue<SessionRegistry.EnqueuedMessage> sessionQueue) {
this(clientId, clean, MqttVersion.MQTT_3_1, sessionQueue);
this.will = will;
}

Session(String clientId, boolean clean, MqttVersion protocolVersion, Will will, SessionMessageQueue<SessionRegistry.EnqueuedMessage> sessionQueue) {
this(clientId, clean, protocolVersion, sessionQueue);
this.will = will;
}

Session(String clientId, boolean clean, SessionMessageQueue<SessionRegistry.EnqueuedMessage> sessionQueue) {
this(clientId, clean, MqttVersion.MQTT_3_1, sessionQueue);
}
Session(String clientId, boolean clean, MqttVersion protocolVersion, SessionMessageQueue<SessionRegistry.EnqueuedMessage> sessionQueue) {
if (sessionQueue == null) {
throw new IllegalArgumentException("sessionQueue parameter can't be null");
Expand Down Expand Up @@ -447,7 +438,7 @@ private MqttPublishMessage publishNotRetainedDuplicated(int packetId, Topic topi

private void drainQueueToConnection() {
// consume the queue
while (!sessionQueue.isEmpty() && inflighHasSlotsAndConnectionIsUp()) {
while (!sessionQueue.isEmpty() && inflightHasSlotsAndConnectionIsUp()) {
final SessionRegistry.EnqueuedMessage msg = sessionQueue.dequeue();
if (msg == null) {
// Our message was already fetched by another Thread.
Expand Down

0 comments on commit e687336

Please sign in to comment.