From 7f2d498367cbb827d76b9ba5443d11c9dfe4febd Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 16 Oct 2022 09:45:05 +0200 Subject: [PATCH] Fix a wrong variable name caused by copy & paste GetRemoteCandidatesStats() should not name its variable localCandidates. --- agent_stats.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent_stats.go b/agent_stats.go index 0c25d08..5d1248b 100644 --- a/agent_stats.go +++ b/agent_stats.go @@ -93,8 +93,8 @@ func (a *Agent) GetRemoteCandidatesStats() []CandidateStats { var res []CandidateStats err := a.run(a.context(), func(ctx context.Context, agent *Agent) { result := make([]CandidateStats, 0, len(agent.remoteCandidates)) - for networkType, localCandidates := range agent.remoteCandidates { - for _, c := range localCandidates { + for networkType, remoteCandidates := range agent.remoteCandidates { + for _, c := range remoteCandidates { stat := CandidateStats{ Timestamp: time.Now(), ID: c.ID(),