Using block in the externally controlled example (#1422)

This commit is contained in:
Luke Latham 2018-05-16 09:26:55 -05:00 committed by Chris Ross
parent 5227de9a31
commit 0b6dbab37a
1 changed files with 4 additions and 2 deletions

View File

@ -37,9 +37,11 @@ namespace SampleStartups
} }
public async Task StopAsync() public async Task StopAsync()
{
using (_host)
{ {
await _host.StopAsync(TimeSpan.FromSeconds(5)); await _host.StopAsync(TimeSpan.FromSeconds(5));
_host.Dispose(); }
} }
public void AddUrl(string url) public void AddUrl(string url)