Skip to content

Commit

Permalink
Fixed variable init error on MQTT Sparkplug Client.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed Jun 27, 2023
1 parent 7fa96e6 commit c6eb959
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/mqtt-sparkplug/sparkplug-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,11 @@ function SparkplugClient(config) {
return;
}

var payload;
var payload, timestamp, splitTopic;

try {
payload = maybeDecompressPayload(decodePayload(message)),
timestamp = payload.timestamp,
splitTopic,
metrics;
payload = maybeDecompressPayload(decodePayload(message));
timestamp = payload.timestamp;
}
catch (e) {
logger.warn(e.message);
Expand Down

0 comments on commit c6eb959

Please sign in to comment.