Skip to content

Commit

Permalink
Fix a wrong variable name caused by copy & paste
Browse files Browse the repository at this point in the history
GetRemoteCandidatesStats() should not name its variable localCandidates.
  • Loading branch information
stv0g authored and ashellunts committed Nov 1, 2022
1 parent bafaab6 commit 7f2d498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 7f2d498

Please sign in to comment.