Skip to content

Commit 9ed5738

Browse files
Merge pull request #31 from tebeco/removing_async_void
Should never use async void
2 parents ce45fa3 + 4a2a478 commit 9ed5738

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static IWebHost BuildWebHost(string[] args)
4545
Open the Electron Window in the Startup.cs file:
4646

4747
```csharp
48-
public async void Configure(IApplicationBuilder app, IHostingEnvironment env)
48+
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
4949
{
5050
if (env.IsDevelopment())
5151
{
@@ -67,7 +67,7 @@ public async void Configure(IApplicationBuilder app, IHostingEnvironment env)
6767
});
6868

6969
// Open the Electron-Window here
70-
await Electron.WindowManager.CreateWindowAsync();
70+
Task.Run(async () => await Electron.WindowManager.CreateWindowAsync());
7171
}
7272
```
7373

0 commit comments

Comments
 (0)