Skip to content

Commit

Permalink
Fixes issue aciidgh#46
Browse files Browse the repository at this point in the history
  • Loading branch information
noelportugal authored Mar 13, 2022
1 parent 6667e19 commit 3c02caf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SwiftMQTT/SwiftMQTT/MQTTSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ open class MQTTSession {
case let pubAck as MQTTPubAck:
callSuccessCompletionBlock(for: pubAck.messageID)
case let publishPacket as MQTTPublishPacket:
sendPubAck(for: publishPacket.messageID)
if publishPacket.message.QoS != .atMostOnce {
sendPubAck(for: publishPacket.messageID)
}
let message = MQTTMessage(publishPacket: publishPacket)
delegateQueue.async { [weak self] in
self?.delegate?.mqttDidReceive(message: message, from: self!)
Expand Down

0 comments on commit 3c02caf

Please sign in to comment.