We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c31406f commit 812265cCopy full SHA for 812265c
samples/kubernetes/graceful-shutdown/graceful-shutdown.md
@@ -49,8 +49,8 @@ app.Use((httpContext, next) =>
49
{
50
var hostLifetime = httpContext.RequestServices.GetRequiredService<IHostApplicationLifetime>();
51
var originalCt = httpContext.RequestAborted;
52
- var combinedCt = CancellationTokenSource.CreateLinkedTokenSource(originalCt, hostLifetime.ApplicationStopping).Token;
53
- httpContext.RequestAborted = combinedCt;
+ using var combinedCts = CancellationTokenSource.CreateLinkedTokenSource(originalCt, hostLifetime.ApplicationStopping);
+ httpContext.RequestAborted = combinedCts.Token;
54
return next(httpContext);
55
});
56
```
0 commit comments