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.
This commit is contained in:
Brian Goff
2018-11-05 11:37:00 -08:00
committed by Robbie Zhang
parent 2743c07222
commit bec818bf3c
3 changed files with 47 additions and 20 deletions

View File

@@ -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()
}()