Commit 43fc44f071c7b7dc1027c888db7d22c0d32c4cfa
Committed by
Andrew Shvayka
1 parent
7dfed3e1
fixed >= with > for MessageQueueSizePerDeviceLimit according to test results
Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -229,7 +229,7 @@ public class MqttTransportHandler extends ChannelInboundHandlerAdapter implement |
229 | 229 | |
230 | 230 | private void enqueueRegularSessionMsg(ChannelHandlerContext ctx, MqttMessage msg) { |
231 | 231 | final int queueSize = deviceSessionCtx.getMsgQueueSize().incrementAndGet(); |
232 | - if (queueSize >= context.getMessageQueueSizePerDeviceLimit()) { | |
232 | + if (queueSize > context.getMessageQueueSizePerDeviceLimit()) { | |
233 | 233 | log.warn("Closing current session because msq queue size for device {} exceed limit {} with msgQueueSize counter {} and actual queue size {}", |
234 | 234 | deviceSessionCtx.getDeviceId(), context.getMessageQueueSizePerDeviceLimit(), queueSize, deviceSessionCtx.getMsgQueue().size()); |
235 | 235 | ctx.close(); | ... | ... |