Skip to content

Commit

Permalink
Use global id generator to reduce allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
AnshulMalik authored and Sean-Der committed Jun 8, 2023
1 parent 13378ba commit 346feb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions candidate_peer_reflexive.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ func NewCandidatePeerReflexive(config *CandidatePeerReflexiveConfig) (*Candidate
}

candidateID := config.CandidateID
candidateIDGenerator := newCandidateIDGenerator()
if candidateID == "" {
candidateID = candidateIDGenerator.Generate()
candidateID = globalCandidateIDGenerator.Generate()
}

return &CandidatePeerReflexive{
Expand Down

0 comments on commit 346feb2

Please sign in to comment.