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

Fix for QoS 0
This commit is contained in:
Andrew Shvayka 2018-06-07 23:32:56 +03:00 committed by GitHub
commit ce5a4f591b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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