diff --git a/actors.go b/actors.go index ef93495..d1bc754 100644 --- a/actors.go +++ b/actors.go @@ -15,6 +15,7 @@ func SignalHandler(ctx context.Context, signals ...os.Signal) (execute func() er return func() error { c := make(chan os.Signal, 1) signal.Notify(c, signals...) + defer signal.Stop(c) select { case sig := <-c: return SignalError{Signal: sig}