mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Use time.NewTicker instead of time.Tick to avoid leaking
This commit is contained in:
parent
30ea05ae7b
commit
1fbf06f5ad
@ -157,8 +157,7 @@ func (m *manager) Start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
klog.InfoS("Starting to sync pod status with apiserver")
|
klog.InfoS("Starting to sync pod status with apiserver")
|
||||||
//lint:ignore SA1015 Ticker can link since this is only called once and doesn't handle termination.
|
syncTicker := time.NewTicker(syncPeriod).C
|
||||||
syncTicker := time.Tick(syncPeriod)
|
|
||||||
// syncPod and syncBatch share the same go routine to avoid sync races.
|
// syncPod and syncBatch share the same go routine to avoid sync races.
|
||||||
go wait.Forever(func() {
|
go wait.Forever(func() {
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user