Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions server/image_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@
// the cancel function will be called.
func consumeImagePullProgress(ctx context.Context, cancel context.CancelFunc, pullProgressTimeout time.Duration, progress <-chan imageTypes.ProgressProperties, remoteCandidateName storage.RegistryImageReference) {
timer := time.AfterFunc(pullProgressTimeout, func() {
log.Warnf(ctx, "Timed out on waiting up to %s for image pull progress updates", pullProgressTimeout)
cancel()
if pullProgressTimeout != 0 {
log.Warnf(ctx, "Timed out on waiting up to %s for image pull progress updates", pullProgressTimeout)
cancel()
}

Check warning on line 245 in server/image_pull.go

View check run for this annotation

Codecov / codecov/patch

server/image_pull.go#L242-L245

Added lines #L242 - L245 were not covered by tests
})
timer.Stop() // don't start the timer immediately
defer timer.Stop() // ensure that the timer is stopped when we exit the progress loop
Expand Down
Loading