about summary refs log tree commit diff
path: root/main.go
diff options
context:
space:
mode:
authorV <v@anomalous.eu>2021-08-14 17:06:13 +0200
committerV <v@anomalous.eu>2021-08-14 17:06:13 +0200
commit8ba8c2b833f54e4f3c075498d7dd18aa89bf4fdc (patch)
tree96409c6e6d1d14c43cd5206187806cc8da03c808 /main.go
parent6c8cd3cab8e1eb9f43444b2bfbbacc66b6d9e604 (diff)
downloadcgiserver-8ba8c2b833f54e4f3c075498d7dd18aa89bf4fdc.tar.zst
that doesn't need to be waited on errgroup
thanks for the catch, edef
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
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,