Skip to content

Commit cdae3ec

Browse files
howardjohnSteven Dake
authored and
Steven Dake
committed
Fix linter error (istio#19264)
istio#19174 somehow got a linter error merged due to golangci/golangci-lint#840. This resolves the error
1 parent 86cc6df commit cdae3ec

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

galley/pkg/crd/validation/validation.go

+6-8
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,12 @@ func RunValidation(ready chan<- struct{}, stopCh chan struct{}, vc *WebhookParam
139139
}
140140

141141
go func() {
142-
for range stopCh {
143-
if livenessProbeController != nil {
144-
validationLivenessProbe.SetAvailable(errors.New("stopped"))
145-
}
146-
if readinessProbeController != nil {
147-
validationReadinessProbe.SetAvailable(errors.New("stopped"))
148-
}
149-
break
142+
<-stopCh
143+
if livenessProbeController != nil {
144+
validationLivenessProbe.SetAvailable(errors.New("stopped"))
145+
}
146+
if readinessProbeController != nil {
147+
validationReadinessProbe.SetAvailable(errors.New("stopped"))
150148
}
151149
}()
152150
go wh.Run(ready, stopCh)

0 commit comments

Comments
 (0)