Browse Source

Fix credential generation.

release/3.x.x
Christian Kratky 5 years ago
parent
commit
9da3377aa7
1 changed files with 8 additions and 5 deletions
  1. +8
    -5
      Tests/MQTTnet.TestApp.UniversalWindows/MainPage.xaml.cs

+ 8
- 5
Tests/MQTTnet.TestApp.UniversalWindows/MainPage.xaml.cs View File

@@ -119,12 +119,15 @@ namespace MQTTnet.TestApp.UniversalWindows
throw new InvalidOperationException();
}

options.Credentials = new MqttClientCredentials
if (!string.IsNullOrEmpty(User.Text))
{
Username = User.Text,
Password = Password.Text
};

options.Credentials = new MqttClientCredentials
{
Username = User.Text,
Password = Password.Text
};
}
options.CleanSession = CleanSession.IsChecked == true;
options.KeepAlivePeriod = TimeSpan.FromSeconds(double.Parse(KeepAliveInterval.Text));



Loading…
Cancel
Save