Skip to content

Commit

Permalink
refactor(sparkplug): applies State pattern to SparkplugMqttClient, fi…
Browse files Browse the repository at this point in the history
…xed onConnectionLost status reset

Signed-off-by: Marcello Martina <[email protected]>
  • Loading branch information
marcellorinaldo committed Feb 2, 2024
1 parent 4fd0318 commit d22484d
Show file tree
Hide file tree
Showing 2 changed files with 224 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ public void removeDataTransportListener(DataTransportListener listener) {
@Override
public void connectionLost(Throwable arg0) {
logger.info("{} - Connection lost", this.kuraServicePid);
this.client.handleConnectionLost();
this.dataTransportListeners.forEach(listener -> callSafely(listener::onConnectionLost, arg0));

}

@Override
Expand Down
Loading

0 comments on commit d22484d

Please sign in to comment.