Skip to content

Commit 11723e4

Browse files
authored
fix(fleetshard-sync): Skip sending central statuses if nothing to report (#2267)
1 parent 4e34dae commit 11723e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fleetshard/pkg/runtime/runtime.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ func (r *Runtime) handleReconcileResults(results <-chan reconcileResult) {
292292
statuses[central.Id] = result.status
293293
}
294294
}
295-
295+
if len(statuses) == 0 {
296+
return
297+
}
296298
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
297299
defer cancel()
298300
_, err := r.client.PrivateAPI().UpdateCentralClusterStatus(ctx, r.clusterID, statuses)

0 commit comments

Comments
 (0)