Refactor logging. Remove TCP adapter from HTTP host if disabled.

This commit is contained in:
Christian
2018-05-13 20:18:08 +02:00
parent 8df8cb1eb6
commit dc7b9414d9
13 changed files with 41 additions and 38 deletions
@@ -17,8 +17,8 @@ namespace MQTTnet.TestApp.NetCore
Console.WriteLine("Press 'c' for concurrent sends. Otherwise in one batch.");
var concurrent = Console.ReadKey(true).KeyChar == 'c';
var server = Task.Factory.StartNew(async () => await RunServerAsync(), TaskCreationOptions.LongRunning);
var client = Task.Factory.StartNew(async () => await RunClientAsync(2000, TimeSpan.FromMilliseconds(10), concurrent), TaskCreationOptions.LongRunning);
var server = Task.Run(RunServerAsync);
var client = Task.Run(() => RunClientAsync(2000, TimeSpan.FromMilliseconds(10), concurrent));
await Task.WhenAll(server, client).ConfigureAwait(false);
}