Skip to content

Commit

Permalink
Close connection if candidates already exist
Browse files Browse the repository at this point in the history
Close connection if candidates already exits
  • Loading branch information
cnderrauber committed Nov 21, 2022
1 parent b57764d commit 7f13fd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@ func (a *Agent) addCandidate(ctx context.Context, c Candidate, candidateConn net
if err := c.close(); err != nil {
a.log.Warnf("Failed to close duplicate candidate: %v", err)
}
if err := candidateConn.Close(); err != nil {
a.log.Warnf("Failed to close duplicate candidate connection: %v", err)
}
return
}
}
Expand Down

0 comments on commit 7f13fd1

Please sign in to comment.