mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 11:03:07 +08:00
Add support for chaning passwords
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user