Add support for chaning passwords

This commit is contained in:
Christian Kratky
2017-10-25 19:50:37 +02:00
parent c257e5cb77
commit a9b394401b
15 changed files with 52 additions and 46 deletions
@@ -10,7 +10,5 @@ namespace MQTTnet.Core.ManagedClient
TimeSpan AutoReconnectDelay { get; }
IManagedMqttClientStorage Storage { get; }
Func<IManagedMqttClientOptions, string> PasswordProvider { get; }
}
}
@@ -6,7 +6,6 @@ using System.Threading;
using System.Threading.Tasks;
using MQTTnet.Core.Client;
using MQTTnet.Core.Exceptions;
using MQTTnet.Core.Packets;
using MQTTnet.Core.Protocol;
using Microsoft.Extensions.Logging;
@@ -277,7 +276,6 @@ namespace MQTTnet.Core.ManagedClient
try
{
_options.PasswordProvider?.Invoke(_options);
await _mqttClient.ConnectAsync(_options.ClientOptions).ConfigureAwait(false);
return ReconnectionResult.Reconnected;
}
@@ -10,8 +10,5 @@ namespace MQTTnet.Core.ManagedClient
public TimeSpan AutoReconnectDelay { get; set; } = TimeSpan.FromSeconds(5);
public IManagedMqttClientStorage Storage { get; set; }
public Func<IManagedMqttClientOptions, string> PasswordProvider { get; set; }
}
}