From 620ceea3e2c08d462602f90ab396ae44767cc161 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Mon, 5 Nov 2018 11:37:00 -0800 Subject: [PATCH] Do not close pod sync, use context cancel instead. (#402) Closing the channel is racey and can lead to a panic on exit. Instead rely on context cancellation to know if workers should exit. --- root.go | 1 - 1 file changed, 1 deletion(-) diff --git a/root.go b/root.go index 0a0e668..14bcd63 100644 --- a/root.go +++ b/root.go @@ -95,7 +95,6 @@ This allows users to schedule kubernetes workloads on nodes that aren't running signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM) go func() { <-sig - f.Stop() cancel() }()