diff --git a/docs/core/extensions/generic-host.md b/docs/core/extensions/generic-host.md index f9a040858984b..4094574d7e7dc 100644 --- a/docs/core/extensions/generic-host.md +++ b/docs/core/extensions/generic-host.md @@ -243,13 +243,13 @@ There are several ways in which a hosted process is stopped. Most commonly, a ho - If someone doesn't call or and the app exits normally with `Main` completing. - If the app crashes. -- If the app is forcefully shut down using [SIGKILL][sigkill] (or CTRL+Z). +- If the app is forcefully shut down using [SIGKILL][sigkill] (or Ctrl+Z). The hosting code isn't responsible for handling these scenarios. The owner of the process needs to deal with them the same as any other app. There are several other ways in which a hosted service process can be stopped: - If `ConsoleLifetime` is used (), it listens for the following signals and attempts to stop the host gracefully. - - [SIGINT][sigint] (or CTRL+C). - - [SIGQUIT][sigquit] (or CTRL+BREAK on Windows, CTRL+\\ on Unix). + - [SIGINT][sigint] (or Ctrl+C). + - [SIGQUIT][sigquit] (or Ctrl+BREAK on Windows, Ctrl+\\ on Unix). - [SIGTERM][sigterm] (sent by other apps, such as `docker stop`). - If the app calls . @@ -305,7 +305,7 @@ to exit gracefully. There are various other common scenarios in which graceful shutdown works in Kestrel for both HTTP/1.1 and HTTP/2 protocols, and how you can configure it in different environments with a load balancer to drain traffic smoothly. While web server configuration is beyond the scope of this article, you can find more information on [Configure options for the ASP.NET Core Kestrel web server](/aspnet/core/fundamentals/servers/kestrel/options) documentation. -When the Host receives a shutdown signal (for example, CTL+C or `StopAsync`), it notifies the application by signaling . You should subscribe to this event if you have any long-running operations that need to finish gracefully. +When the Host receives a shutdown signal (for example, Ctrl+C or `StopAsync`), it notifies the application by signaling . You should subscribe to this event if you have any long-running operations that need to finish gracefully. Next, the Host calls with a shutdown timeout that you can configure (default 30s). Kestrel (and Http.Sys) close their port bindings and stop accepting new connections. They also tell the current connections to stop processing new requests. For HTTP/2 and HTTP/3, a preliminary `GOAWAY` message is sent to the client. For HTTP/1.1, they stop the connection loop because requests are processed in order. IIS behaves differently, by rejecting new requests with a 503 status code.