mqtt 5.8.0 → 5.8.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/build/lib/client.d.ts +1 -1
- package/build/lib/client.js +12 -2
- package/build/lib/client.js.map +1 -1
- package/build/lib/handlers/index.js +1 -1
- package/build/lib/handlers/index.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +4 -4
- package/dist/mqtt.js +12 -4
- package/dist/mqtt.min.js +4 -4
- package/package.json +1 -1
- package/src/lib/client.ts +14 -2
- package/src/lib/handlers/index.ts +1 -1
package/package.json
CHANGED
package/src/lib/client.ts
CHANGED
|
@@ -732,6 +732,13 @@ export default class MqttClient extends TypedEventEmitter<MqttClientEventCallbac
|
|
|
732
732
|
this.log('connect :: calling method to clear reconnect')
|
|
733
733
|
this._clearReconnect()
|
|
734
734
|
|
|
735
|
+
if (this.disconnected && !this.reconnecting) {
|
|
736
|
+
this.incomingStore = this.options.incomingStore || new Store()
|
|
737
|
+
this.outgoingStore = this.options.outgoingStore || new Store()
|
|
738
|
+
this.disconnecting = false
|
|
739
|
+
this.disconnected = false
|
|
740
|
+
}
|
|
741
|
+
|
|
735
742
|
this.log(
|
|
736
743
|
'connect :: using streamBuilder provided to client to create stream',
|
|
737
744
|
)
|
|
@@ -1459,6 +1466,11 @@ export default class MqttClient extends TypedEventEmitter<MqttClientEventCallbac
|
|
|
1459
1466
|
})
|
|
1460
1467
|
if (this._deferredReconnect) {
|
|
1461
1468
|
this._deferredReconnect()
|
|
1469
|
+
} else if (
|
|
1470
|
+
this.options.reconnectPeriod === 0 ||
|
|
1471
|
+
this.options.manualConnect
|
|
1472
|
+
) {
|
|
1473
|
+
this.disconnecting = false
|
|
1462
1474
|
}
|
|
1463
1475
|
}
|
|
1464
1476
|
|
|
@@ -2097,11 +2109,11 @@ export default class MqttClient extends TypedEventEmitter<MqttClientEventCallbac
|
|
|
2097
2109
|
/**
|
|
2098
2110
|
* Reschedule the ping interval
|
|
2099
2111
|
*/
|
|
2100
|
-
public reschedulePing() {
|
|
2112
|
+
public reschedulePing(force = false) {
|
|
2101
2113
|
if (
|
|
2102
2114
|
this.keepaliveManager &&
|
|
2103
2115
|
this.options.keepalive &&
|
|
2104
|
-
this.options.reschedulePings
|
|
2116
|
+
(force || this.options.reschedulePings)
|
|
2105
2117
|
) {
|
|
2106
2118
|
this._reschedulePing()
|
|
2107
2119
|
}
|