Close connection if candidates already exist

Close connection if candidates already exits
This commit is contained in:
cnderrauber
2022-11-21 17:38:44 +08:00
committed by cnderrauber
parent b57764d898
commit 7f13fd1947
+3
View File
@@ -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
}
}