mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-31 03:02:39 +08:00
Fix credential generation.
This commit is contained in:
@@ -119,12 +119,15 @@ namespace MQTTnet.TestApp.UniversalWindows
|
|||||||
throw new InvalidOperationException();
|
throw new InvalidOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
options.Credentials = new MqttClientCredentials
|
if (!string.IsNullOrEmpty(User.Text))
|
||||||
{
|
{
|
||||||
Username = User.Text,
|
options.Credentials = new MqttClientCredentials
|
||||||
Password = Password.Text
|
{
|
||||||
};
|
Username = User.Text,
|
||||||
|
Password = Password.Text
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
options.CleanSession = CleanSession.IsChecked == true;
|
options.CleanSession = CleanSession.IsChecked == true;
|
||||||
options.KeepAlivePeriod = TimeSpan.FromSeconds(double.Parse(KeepAliveInterval.Text));
|
options.KeepAlivePeriod = TimeSpan.FromSeconds(double.Parse(KeepAliveInterval.Text));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user