Skip to content

Commit 3371a95

Browse files
committed
wait doesn't actually need an erro
1 parent a5e2b34 commit 3371a95

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cns/restserver/synchostnc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,16 @@ func (service *HTTPRestService) mustGenerateCNIConflistOnce() {
200200
})
201201
}
202202

203-
func (service *HTTPRestService) WaitForNCSynced(ctx context.Context) error {
203+
func (service *HTTPRestService) WaitForConfList(ctx context.Context) {
204204
//sync loop never set up get out of here.
205205
if service.ncSynced == nil {
206-
return nil
206+
return
207207
}
208208

209209
select {
210210
case <-service.ncSynced:
211-
return nil
211+
return
212212
case <-ctx.Done():
213-
return ctx.Err()
213+
return
214214
}
215215
}

cns/service/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ func main() {
11191119
}
11201120

11211121
//we wrote out the conflist right?
1122-
httpRemoteRestService.WaitForNCSynced(rootCtx)
1122+
httpRemoteRestService.WaitForConfList(rootCtx)
11231123
// mark the service as "ready"
11241124
close(readyCh) //will still block if root ctx is canceled?
11251125
// block until process exiting

0 commit comments

Comments
 (0)