mqtt 5.3.4 → 5.3.5
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 +14 -2
- package/build/lib/PingTimer.d.ts +0 -1
- package/build/lib/PingTimer.js +7 -8
- package/build/lib/PingTimer.js.map +1 -1
- package/build/lib/client.js +4 -4
- package/build/lib/client.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +1 -1
- package/dist/mqtt.js +11 -12
- package/dist/mqtt.min.js +1 -1
- package/package.json +2 -2
- package/src/lib/PingTimer.ts +9 -9
- package/src/lib/client.ts +4 -4
package/dist/mqtt.js
CHANGED
|
@@ -17573,13 +17573,7 @@ var mqtt = (() => {
|
|
|
17573
17573
|
this._clearTimeout = is_browser_1.default && !is_browser_1.isWebWorker ? worker_timers_1.clearTimeout : (timer) => clearTimeout(timer);
|
|
17574
17574
|
this.keepalive = keepalive * 1e3;
|
|
17575
17575
|
this.checkPing = checkPing;
|
|
17576
|
-
this.
|
|
17577
|
-
}
|
|
17578
|
-
setup() {
|
|
17579
|
-
this.timer = this._setTimeout(() => {
|
|
17580
|
-
this.checkPing();
|
|
17581
|
-
this.reschedule();
|
|
17582
|
-
}, this.keepalive);
|
|
17576
|
+
this.reschedule();
|
|
17583
17577
|
}
|
|
17584
17578
|
clear() {
|
|
17585
17579
|
if (this.timer) {
|
|
@@ -17589,7 +17583,12 @@ var mqtt = (() => {
|
|
|
17589
17583
|
}
|
|
17590
17584
|
reschedule() {
|
|
17591
17585
|
this.clear();
|
|
17592
|
-
this.
|
|
17586
|
+
this.timer = this._setTimeout(() => {
|
|
17587
|
+
this.checkPing();
|
|
17588
|
+
if (this.timer) {
|
|
17589
|
+
this.reschedule();
|
|
17590
|
+
}
|
|
17591
|
+
}, this.keepalive);
|
|
17593
17592
|
}
|
|
17594
17593
|
};
|
|
17595
17594
|
exports5.default = PingTimer;
|
|
@@ -17764,7 +17763,7 @@ var mqtt = (() => {
|
|
|
17764
17763
|
this.log("close :: clearing connackTimer");
|
|
17765
17764
|
clearTimeout(this.connackTimer);
|
|
17766
17765
|
this.log("close :: clearing ping timer");
|
|
17767
|
-
if (this.pingTimer
|
|
17766
|
+
if (this.pingTimer) {
|
|
17768
17767
|
this.pingTimer.clear();
|
|
17769
17768
|
this.pingTimer = null;
|
|
17770
17769
|
}
|
|
@@ -18390,12 +18389,12 @@ var mqtt = (() => {
|
|
|
18390
18389
|
});
|
|
18391
18390
|
});
|
|
18392
18391
|
}
|
|
18393
|
-
if (!this.disconnecting) {
|
|
18394
|
-
this.log("_cleanUp :: client not disconnecting. Clearing and resetting reconnect.");
|
|
18392
|
+
if (!this.disconnecting && !this.reconnecting) {
|
|
18393
|
+
this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect.");
|
|
18395
18394
|
this._clearReconnect();
|
|
18396
18395
|
this._setupReconnect();
|
|
18397
18396
|
}
|
|
18398
|
-
if (this.pingTimer
|
|
18397
|
+
if (this.pingTimer) {
|
|
18399
18398
|
this.log("_cleanUp :: clearing pingTimer");
|
|
18400
18399
|
this.pingTimer.clear();
|
|
18401
18400
|
this.pingTimer = null;
|