Skip to content

Commit

Permalink
fix: don't mark all previou zoneinsight subs disconnected
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont committed Oct 27, 2023
1 parent cf9173c commit 1ac6526
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions api/system/v1alpha1/zone_insight_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (x *ZoneInsight) UpdateSubscription(s generic.Subscription) error {
return nil
}
}
x.finalizeSubscriptions()
x.Subscriptions = append(x.Subscriptions, kdsSubscription)
return nil
}
Expand All @@ -94,18 +93,6 @@ func (x *ZoneInsight) CompactFinished() {
}
}

// If Global CP was killed ungracefully then we can get a subscription without a DisconnectTime.
// Because of the way we process subscriptions the lack of DisconnectTime on old subscription
// will cause wrong status.
func (x *ZoneInsight) finalizeSubscriptions() {
now := util_proto.Now()
for _, subscription := range x.GetSubscriptions() {
if subscription.DisconnectTime == nil {
subscription.DisconnectTime = now
}
}
}

func NewVersion() *Version {
return &Version{
KumaCp: &KumaCpVersion{
Expand Down

0 comments on commit 1ac6526

Please sign in to comment.