Skip to content

Commit

Permalink
fix: use non-blocking MQTT client connection status (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDombo committed Mar 15, 2023
1 parent 9415aed commit d13be06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void registerHandler(Consumer<NetworkStateProvider.ConnectionState> netwo
*/
@Override
public NetworkStateProvider.ConnectionState getConnectionState() {
if (mqttClient.connected()) {
if (mqttClient.getMqttOnline().get()) {
return NetworkStateProvider.ConnectionState.NETWORK_UP;
} else {
return NetworkStateProvider.ConnectionState.NETWORK_DOWN;
Expand Down

0 comments on commit d13be06

Please sign in to comment.