Skip to content

Commit 5fc23ff

Browse files
committed
Merge branch 'master' of github.com:karpach/remote-shutdown-pc
2 parents 4c6e9f7 + 3bbc296 commit 5fc23ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Karpach.RemoteShutdown.Controller/Helpers/HostHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public async Task CreateHostAsync(int port)
3636
await _hostTask.ConfigureAwait(false);
3737
_cancellationTokenSource = new CancellationTokenSource();
3838
}
39-
_hostTask = Task.Run(() =>
39+
_hostTask = Task.Run(async () =>
4040
{
4141
var host = new WebHostBuilder()
4242
.UseUrls($"http://+:{port}")
@@ -52,7 +52,7 @@ public async Task CreateHostAsync(int port)
5252
});
5353
})
5454
.Build();
55-
host.StartAsync(_cancellationTokenSource.Token);
55+
await host.StartAsync(_cancellationTokenSource.Token);
5656
}, _cancellationTokenSource.Token);
5757
}
5858

0 commit comments

Comments
 (0)