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

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