Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
fix(server): reuse context
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev committed Jan 28, 2022
1 parent 90c46cb commit e073aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/dummy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func run() error {

const timeout = 5 * time.Second

ctx, cancelFunc := context.WithTimeout(context.Background(), timeout)
ctx, cancelFunc := context.WithTimeout(ctx, timeout)
defer cancelFunc()

return s.Stop(ctx)
Expand Down

0 comments on commit e073aca

Please sign in to comment.