Skip to content

Commit

Permalink
ensure cancel called for the context on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 6, 2023
1 parent 1166ae1 commit ee9d4ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func main() {
log.Printf("[DEBUG] options: %+v", opts)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

go func() {
// catch signal and invoke graceful termination
Expand Down

0 comments on commit ee9d4ac

Please sign in to comment.