diff --git a/lib/client.js b/lib/client.js index 447385947..d9623202a 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1806,7 +1806,6 @@ MqttClient.prototype._onConnect = function (packet) { if (!outStore) { return } - that._storeProcessing = true const packet = outStore.read(1) @@ -1818,6 +1817,8 @@ MqttClient.prototype._onConnect = function (packet) { return } + that._storeProcessing = true + // Skip already processed store packets if (that._packetIdsDuringStoreProcessing[packet.messageId]) { storeDeliver()