From 8f4d73beeedf4949c2d579010521313964241d94 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 6 Apr 2017 13:08:36 +0200 Subject: Buffer signal --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 0b91791..97f9839 100644 --- a/main.go +++ b/main.go @@ -81,7 +81,7 @@ func notifier(ctx context.Context) chan string { } func atInterrupt(cancel context.CancelFunc) { - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { <-c -- cgit v1.2.3