diff --git a/rfm69d/rfm69d.go b/rfm69d/rfm69d.go index 5d9eaa5..1c89d85 100644 --- a/rfm69d/rfm69d.go +++ b/rfm69d/rfm69d.go @@ -49,11 +49,15 @@ func main() { quit := rfm.Loop() - sigint := make(chan os.Signal) + sigint := make(chan os.Signal, 1) signal.Notify(sigint, os.Interrupt) - <-sigint - - quit <- 1 - <-quit + for { + select { + case <-sigint: + quit <- 1 + <-quit + return + } + } }