Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

StopAsync cancellationToken chaining #1016

Closed
@Tratcher

Description

@Tratcher

In https://github.com/aspnet/Hosting/pull/995/files we added IWebHost.StopAsync(CancellationToken) and an extension method StopAsync(). The extension method does not have access to the WebHostOptions to get the timeout, so it can only specify CancellationToken.None. In the real implementation we check if the token passed in can be cancelled, and if not then we create a new one using the timeout. This is not the most intuitive so I've filed this bug for followup design.

Prior art: HttpClient has a default timeout and SendAsync also accepts cancellationTokens. SendAsync creates a linked CTS using both the cancellationToken and the timeout.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions