fixed core 3.1 startup and verified it still works with 2.1 and net461

This commit is contained in:
JanEggers
2020-03-15 14:43:59 +01:00
parent f6a814c6d7
commit 20eda96921
14 changed files with 102 additions and 34 deletions
+5 -3
View File
@@ -1,19 +1,21 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using MQTTnet.AspNetCore;
using System.Threading.Tasks;
namespace MQTTnet.TestApp.AspNetCore2
{
public static class Program
{
public static void Main(string[] args)
public static Task Main(string[] args)
{
BuildWebHost(args).Run();
return BuildWebHost(args).RunAsync();
}
private static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseKestrel(o => {
.UseKestrel(o =>
{
o.ListenAnyIP(1883, l => l.UseMqtt());
o.ListenAnyIP(5000); // default http pipeline
})