diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go index 3da87b6..67ce48c 100644 --- a/main.go +++ b/main.go @@ -72,8 +72,8 @@ func main() { group, ctx := errgroup.WithContext(ctx) srv.BaseContext = func(net.Listener) context.Context { return ctx } - group.Go(func() error { - // Catch SIGTERM so we can shutdown gracefully. + // Catch SIGTERM so we can shutdown gracefully. + go func() error { sig := make(chan os.Signal, 1) signal.Notify(sig, syscall.SIGTERM, syscall.SIGINT) @@ -86,7 +86,7 @@ func main() { } return nil - }) + }() for _, ln := range lns { // Loop variables are unsafe to close over with goroutines, |