Make sure to break loop and not select

pull/12184/head
Anders F Björklund 2021-08-10 13:16:45 +02:00
parent dbb295d078
commit e91b037546
1 changed files with 2 additions and 1 deletions

View File

@ -289,6 +289,7 @@ func ImageToDaemon(img string) error {
errchan <- err errchan <- err
}() }()
var update v1.Update var update v1.Update
loop:
for { for {
select { select {
case update = <-c: case update = <-c:
@ -299,7 +300,7 @@ func ImageToDaemon(img string) error {
if err != nil { if err != nil {
return errors.Wrap(err, "writing daemon image") return errors.Wrap(err, "writing daemon image")
} }
break break loop
} }
} }
klog.V(3).Infof("Pulling image %v", ref) klog.V(3).Infof("Pulling image %v", ref)