]> Cypherpunks.ru repositories - gocheese.git/blobdiff - main.go
chan os.Signal should be buffered
[gocheese.git] / main.go
diff --git a/main.go b/main.go
index e0670d7a8211ebfbc14e2aae43cdfa012d175f68..c14906fb7c87ac04b9308b426850c2efb59346b3 100644 (file)
--- a/main.go
+++ b/main.go
@@ -274,8 +274,8 @@ func main() {
        }
        ln = netutil.LimitListener(ln, *MaxClients)
 
-       needsShutdown := make(chan os.Signal, 0)
-       exitErr := make(chan error, 0)
+       needsShutdown := make(chan os.Signal, 1)
+       exitErr := make(chan error)
        signal.Notify(needsShutdown, syscall.SIGTERM, syscall.SIGINT)
        go func(s *http.Server) {
                <-needsShutdown