Refactor async/await and ConcurrentDictionary usage.

This commit is contained in:
Christian Kratky
2018-06-20 20:07:25 +02:00
parent bc20850fba
commit 0322660561
20 changed files with 409 additions and 245 deletions
+9 -2
View File
@@ -8,12 +8,19 @@ namespace MQTTnet.TestApp.NetCore
{
public static class ServerTest
{
public static void RunEmptyServer()
{
var mqttServer = new MqttFactory().CreateMqttServer();
mqttServer.StartAsync(new MqttServerOptions()).GetAwaiter().GetResult();
Console.WriteLine("Press any key to exit.");
Console.ReadLine();
}
public static async Task RunAsync()
{
try
{
MqttNetConsoleLogger.ForwardToConsole();
var options = new MqttServerOptions
{
ConnectionValidator = p =>