Skip to content

Commit

Permalink
Fix bug causing excessive event sending of workload events.
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hallgren <thomas@tada.se>
  • Loading branch information
thallgren committed Oct 30, 2024
1 parent 5872772 commit 5596c91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/traffic/cmd/manager/state/workload_info_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func rpcWorkload(wl k8sapi.Workload, as rpc.WorkloadInfo_AgentState, iClients []
}

func (wf *workloadInfoWatcher) addEvent(
ctx context.Context,
eventType workload.EventType,
wl k8sapi.Workload,
as rpc.WorkloadInfo_AgentState,
Expand All @@ -207,7 +206,7 @@ func (wf *workloadInfoWatcher) addEvent(
Type: rpc.WorkloadEvent_Type(eventType),
Workload: rpcWorkload(wl, as, iClients),
}
wf.sendEvents(ctx, false)
wf.resetTicker()
}

func (wf *workloadInfoWatcher) handleWorkloadsSnapshot(ctx context.Context, wes []workload.WorkloadEvent, initial bool) {
Expand Down

0 comments on commit 5596c91

Please sign in to comment.