Skip to content

Commit bc1401f

Browse files
paulgmillerCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]> Signed-off-by: Paul Miller <[email protected]>
1 parent 84fa79f commit bc1401f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cns/restserver/synchostnc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (service *HTTPRestService) mustGenerateCNIConflistOnce() {
208208
}
209209

210210
func (service *HTTPRestService) WaitForConfList(ctx context.Context) {
211-
//sync loop never set up get out of here.
211+
// Sync loop never set up, get out of here.
212212
if !service.ncSyncLoop.Load() {
213213
return
214214
}

cns/service/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,10 +1118,10 @@ func main() {
11181118
httpRemoteRestService.StartNodeSubnet(rootCtx)
11191119
}
11201120

1121-
//we wrote out the conflist right?
1121+
// Wait for NC sync to complete before marking service as ready.
11221122
httpRemoteRestService.WaitForConfList(rootCtx)
11231123
// mark the service as "ready"
1124-
close(readyCh) //will still block if root ctx is canceled?
1124+
close(readyCh) // This will not block, even if rootCtx is canceled.
11251125
// block until process exiting
11261126
<-rootCtx.Done()
11271127

0 commit comments

Comments
 (0)