feat: release v0.27 unified HTTP limits and safe request shutdown
This commit is contained in:
@@ -41,7 +41,7 @@ func run(ctx context.Context, path string) (runErr error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Unjoined background work may still log. The owning process exits on this
|
||||
// Unjoined HTTP or background work may still log. The owning process exits on this
|
||||
// error; do not close its borrowed logger before that work has finished.
|
||||
defer func() {
|
||||
if !errors.Is(runErr, lifecycle.ErrResourcesRetained) {
|
||||
@@ -52,8 +52,8 @@ func run(ctx context.Context, path string) (runErr error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// RunContext drains HTTP requests before returning. This scope owns dependencies
|
||||
// and closes them exactly once, before closing the borrowed logger.
|
||||
// Finish propagates incomplete HTTP draining: stop background work but retain
|
||||
// shared dependencies when any handler is still running. Otherwise close once.
|
||||
defer func() { runErr = deps.Finish(runErr) }()
|
||||
app, err := handler.NewApp(deps)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user