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

Commit

Permalink
fix(server): use channel
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev committed Jan 28, 2022
1 parent 6a105e6 commit 90c46cb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/dummy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ func run() error {
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)

select {
case x := <-interrupt:
l.Info().Msgf("received `%v`", x)
}
x := <-interrupt
l.Info().Msgf("received `%v`", x)

const timeout = 5 * time.Second

Expand Down

0 comments on commit 90c46cb

Please sign in to comment.