ManagedClient: Add new option for disabling auto reconnect.

This commit is contained in:
Christian Kratky
2020-09-14 23:49:27 +02:00
parent aad9eac361
commit d63143bdc9
4 changed files with 78 additions and 43 deletions
@@ -1,5 +1,4 @@
using System;
using MQTTnet.Client;
using MQTTnet.Client.Options;
using MQTTnet.Server;
@@ -9,6 +8,8 @@ namespace MQTTnet.Extensions.ManagedClient
{
public IMqttClientOptions ClientOptions { get; set; }
public bool AutoReconnect { get; set; } = true;
public TimeSpan AutoReconnectDelay { get; set; } = TimeSpan.FromSeconds(5);
public TimeSpan ConnectionCheckInterval { get; set; } = TimeSpan.FromSeconds(1);