diff options
author | V <v@anomalous.eu> | 2021-08-14 17:06:13 +0200 |
---|---|---|
committer | V <v@anomalous.eu> | 2021-08-14 17:06:13 +0200 |
commit | 8ba8c2b833f54e4f3c075498d7dd18aa89bf4fdc (patch) | |
tree | 96409c6e6d1d14c43cd5206187806cc8da03c808 | |
parent | 6c8cd3cab8e1eb9f43444b2bfbbacc66b6d9e604 (diff) | |
download | cgiserver-8ba8c2b833f54e4f3c075498d7dd18aa89bf4fdc.tar.zst |
that doesn't need to be waited on errgroup
thanks for the catch, edef
-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, |