Skip to content

Commit

Permalink
chore: Fix to use plain channel send or receive (SCC-S1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikawaha committed Oct 16, 2023
1 parent da4de6c commit ac3bd7a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/server/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ func Run(ctx context.Context, args []string) error {
go func() {
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM)
select {
case <-c:
cancel()
}
<-c
cancel()
}()
return command(ctx, opt)
}
Expand Down

0 comments on commit ac3bd7a

Please sign in to comment.