Skip to content

Commit bbc7bf3

Browse files
derekwaynecarrsmarterclayton
authored andcommitted
UPSTREAM: <carry>: JitterUntil should defer to utilruntime.HandleCrash on panic
:100644 100644 c0a6f88... 3208884... M pkg/util/wait/wait.go
1 parent 4023bae commit bbc7bf3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/util/wait/wait.go

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import (
2020
"errors"
2121
"math/rand"
2222
"time"
23+
24+
utilruntime "k8s.io/kubernetes/pkg/util/runtime"
2325
)
2426

2527
// For any test of the style:
@@ -81,6 +83,8 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b
8183
}
8284

8385
func() {
86+
// Handle crash should decide if we want to exit the process on panic.
87+
defer utilruntime.HandleCrash()
8488
f()
8589
}()
8690

0 commit comments

Comments
 (0)