Skip to content

Commit

Permalink
fix Global.MqttReconnect setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Volker Hänsel committed Oct 6, 2023
1 parent f7a9dff commit 79a7bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tuya_mqtt.net/Data/GlobalOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public class GlobalOptions
{
public bool MtqqReconnect { get; set; } = true;
public bool MqttReconnect { get; set; } = true;
public int ExceptionsHealthDegraded { get; set; } = 10; //>10 Exceptions per minute = degraded
public int ExceptionsUnhealthy { get; set; } = 40; //>40 Exceptions per minute = unhealthy

Expand Down
2 changes: 1 addition & 1 deletion tuya_mqtt.net/Services/MqttClientService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private async Task ReconnectMqttBrokerAsync()

if (_mqttClient?.IsConnected == true)
{
_autoReconnect = GlobalOptions.MtqqReconnect;
_autoReconnect = GlobalOptions.MqttReconnect;

if (Options.MqttPort > 0)
_logger.LogInformation($"MQTT client connected to {Options.MqttHost}:{Options.MqttPort}");
Expand Down

0 comments on commit 79a7bac

Please sign in to comment.