Skip to content

Commit

Permalink
refactor GracefulStop (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet authored Jul 29, 2022
1 parent b9caf03 commit 4e44064
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/rusid/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"flag"
"k8s.io/klog/v2"
"net/http"
"syscall"

//_ "net/http/pprof"
"os"
"os/signal"
Expand Down Expand Up @@ -88,7 +90,7 @@ func main() {

func shutdownOnInterrupt(cancel func()) {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)

go func() {
<-c
Expand Down

0 comments on commit 4e44064

Please sign in to comment.