mqtt 5.7.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/build/lib/handlers/ack.js +6 -3
- package/build/lib/handlers/ack.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +4 -4
- package/dist/mqtt.js +7 -4
- package/dist/mqtt.min.js +4 -4
- package/package.json +1 -1
- package/src/lib/handlers/ack.ts +7 -3
package/dist/mqtt.js
CHANGED
|
@@ -12634,7 +12634,7 @@ var mqtt = (() => {
|
|
|
12634
12634
|
// package-json:../../package.json
|
|
12635
12635
|
var require_package = __commonJS({
|
|
12636
12636
|
"package-json:../../package.json"(exports5, module) {
|
|
12637
|
-
module.exports = { version: "5.7.
|
|
12637
|
+
module.exports = { version: "5.7.1" };
|
|
12638
12638
|
}
|
|
12639
12639
|
});
|
|
12640
12640
|
|
|
@@ -12743,7 +12743,7 @@ var mqtt = (() => {
|
|
|
12743
12743
|
const type = packet.cmd;
|
|
12744
12744
|
let response = null;
|
|
12745
12745
|
const cb = client.outgoing[messageId] ? client.outgoing[messageId].cb : null;
|
|
12746
|
-
let err;
|
|
12746
|
+
let err = null;
|
|
12747
12747
|
if (!cb) {
|
|
12748
12748
|
client.log("_handleAck :: Server sent an ack in error. Ignoring.");
|
|
12749
12749
|
return;
|
|
@@ -12787,7 +12787,10 @@ var mqtt = (() => {
|
|
|
12787
12787
|
client.messageIdProvider.deallocate(messageId);
|
|
12788
12788
|
const granted = packet.granted;
|
|
12789
12789
|
for (let grantedI = 0; grantedI < granted.length; grantedI++) {
|
|
12790
|
-
|
|
12790
|
+
const subackRC = granted[grantedI];
|
|
12791
|
+
if ((subackRC & 128) !== 0) {
|
|
12792
|
+
err = new Error(`Subscribe error: ${exports5.ReasonCodes[subackRC]}`);
|
|
12793
|
+
err.code = subackRC;
|
|
12791
12794
|
const topics = client.messageIdToTopic[messageId];
|
|
12792
12795
|
if (topics) {
|
|
12793
12796
|
topics.forEach((topic) => {
|
|
@@ -12798,7 +12801,7 @@ var mqtt = (() => {
|
|
|
12798
12801
|
}
|
|
12799
12802
|
delete client.messageIdToTopic[messageId];
|
|
12800
12803
|
client["_invokeStoreProcessingQueue"]();
|
|
12801
|
-
cb(
|
|
12804
|
+
cb(err, packet);
|
|
12802
12805
|
break;
|
|
12803
12806
|
}
|
|
12804
12807
|
case "unsuback": {
|