Commit ce5a4f591bf2d878215eaa57cc42f3326e4a40eb

Authored by Andrew Shvayka
Committed by GitHub
2 parents 75c0c5b3 b0acf23c

Merge pull request #841 from thingsboard/fix-for-qos-0

Fix for QoS 0
@@ -86,7 +86,7 @@ public class GatewayDeviceSessionCtx extends DeviceAwareSessionContext { @@ -86,7 +86,7 @@ public class GatewayDeviceSessionCtx extends DeviceAwareSessionContext {
86 if (responseMsg.isSuccess()) { 86 if (responseMsg.isSuccess()) {
87 SessionMsgType requestMsgType = responseMsg.getRequestMsgType(); 87 SessionMsgType requestMsgType = responseMsg.getRequestMsgType();
88 Integer requestId = responseMsg.getRequestId(); 88 Integer requestId = responseMsg.getRequestId();
89 - if (requestId >= 0 && requestMsgType == SessionMsgType.POST_ATTRIBUTES_REQUEST || requestMsgType == SessionMsgType.POST_TELEMETRY_REQUEST) { 89 + if (requestId >= 0 && (requestMsgType == SessionMsgType.POST_ATTRIBUTES_REQUEST || requestMsgType == SessionMsgType.POST_TELEMETRY_REQUEST)) {
90 return Optional.of(MqttTransportHandler.createMqttPubAckMsg(requestId)); 90 return Optional.of(MqttTransportHandler.createMqttPubAckMsg(requestId));
91 } 91 }
92 } 92 }