Skip to content

Commit

Permalink
Issu 111 (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamblett authored Sep 20, 2024
1 parent cdfe333 commit 7d86a34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/src/connectionhandling/mqtt_connection_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ class MqttConnectionBase {
// On disconnect clean(discard) anything in the message stream
messageStream.clean();
if (client != null) {
client.destroy();
// TODO needs a proper fix, see issue 111
try {
client.destroy();
} on NoSuchMethodError {
client.close();
}
client = null;
}
}
Expand Down

0 comments on commit 7d86a34

Please sign in to comment.