mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
Properly close channel when monitor exits.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -44,7 +44,11 @@ func main() {
|
||||
fmt.Print(err)
|
||||
os.Exit(int(types.Unknown))
|
||||
}
|
||||
actual := counter.Count()
|
||||
actual, err := counter.Count()
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
os.Exit(int(types.Unknown))
|
||||
}
|
||||
if actual >= fedo.Count {
|
||||
fmt.Printf("Found %d matching logs, which meets the threshold of %d\n", actual, fedo.Count)
|
||||
os.Exit(int(types.NonOK))
|
||||
|
||||
Reference in New Issue
Block a user