Fix initial sync complete on empty service list

This commit is contained in:
Viktor Liu
2026-02-12 15:10:53 +08:00
parent 5d606d909d
commit 38db42e7d6
10 changed files with 693 additions and 267 deletions

View File

@@ -514,10 +514,10 @@ func (s *Server) handleMappingStream(ctx context.Context, mappingClient proto.Pr
}
s.Logger.Debug("Processing mapping update completed")
// After the first mapping sync, mark the initial sync complete.
// Client health is checked directly in the startup probe.
if !*initialSyncDone && s.healthChecker != nil {
s.healthChecker.SetInitialSyncComplete()
if !*initialSyncDone && msg.GetInitialSyncComplete() {
if s.healthChecker != nil {
s.healthChecker.SetInitialSyncComplete()
}
*initialSyncDone = true
s.Logger.Info("Initial mapping sync complete")
}