Share via


WebHostExtensions.StopAsync(IWebHost, TimeSpan) Method

Definition

Attempts to gracefully stop the host with the given timeout.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ StopAsync(Microsoft::AspNetCore::Hosting::IWebHost ^ host, TimeSpan timeout);
public static System.Threading.Tasks.Task StopAsync (this Microsoft.AspNetCore.Hosting.IWebHost host, TimeSpan timeout);
static member StopAsync : Microsoft.AspNetCore.Hosting.IWebHost * TimeSpan -> System.Threading.Tasks.Task
<Extension()>
Public Function StopAsync (host As IWebHost, timeout As TimeSpan) As Task

Parameters

host
IWebHost
timeout
TimeSpan

The timeout for stopping gracefully. Once expired the server may terminate any remaining active connections.

Returns

A Task that completes when the IWebHost stops.

Applies to