Skip to content

Commit 4b77504

Browse files
authored
remove stateCheckPeriod
If exec logForceCheckPeriod, there is no need to exec stateCheckPeriod
1 parent 533daf6 commit 4b77504

File tree

1 file changed

+0
-9
lines changed
  • pkg/kubelet/kuberuntime/logs

1 file changed

+0
-9
lines changed

pkg/kubelet/kuberuntime/logs/logs.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ const (
5151
// timeFormat is the time format used in the log.
5252
timeFormat = time.RFC3339Nano
5353

54-
// stateCheckPeriod is the period to check container state while following
55-
// the container log. Kubelet should not keep following the log when the
56-
// container is not running.
57-
stateCheckPeriod = 5 * time.Second
58-
5954
// logForceCheckPeriod is the period to check for a new read
6055
logForceCheckPeriod = 1 * time.Second
6156
)
@@ -447,10 +442,6 @@ func waitLogs(ctx context.Context, id string, w *fsnotify.Watcher, runtimeServic
447442
errRetry--
448443
case <-time.After(logForceCheckPeriod):
449444
return true, false, nil
450-
case <-time.After(stateCheckPeriod):
451-
if running, err := isContainerRunning(id, runtimeService); !running {
452-
return false, false, err
453-
}
454445
}
455446
}
456447
}

0 commit comments

Comments
 (0)