Should never use async void, also .Start() and .RunSynchronoulsy() seems to deadlock

This commit is contained in:
TeBeCo
2017-11-03 18:31:01 +01:00
parent 0ad6358d16
commit 4a2a4788c8

View File

@@ -38,7 +38,7 @@ public static IWebHost BuildWebHost(string[] args)
Open the Electron Window in the Startup.cs file:
```csharp
public async void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
@@ -60,7 +60,7 @@ public async void Configure(IApplicationBuilder app, IHostingEnvironment env)
});
// Open the Electron-Window here
await Electron.WindowManager.CreateWindowAsync();
Task.Run(async () => await Electron.WindowManager.CreateWindowAsync());
}
```