mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Fix connection nil pointer
Don't assume connection is present if there is an error in listenUDP
This commit is contained in:
committed by
Sean DuBois
parent
953f36f07f
commit
2a0747d42d
@@ -244,7 +244,7 @@ func (a *Agent) gatherCandidatesSrflx(urls []*URL, networkTypes []NetworkType) {
|
||||
|
||||
conn, err := a.listenUDP(int(a.portmax), int(a.portmin), network, &net.UDPAddr{IP: nil, Port: 0})
|
||||
if err != nil {
|
||||
a.log.Warnf("Failed to listen on %s for %s: %v\n", conn.LocalAddr().String(), serverAddr.String(), err)
|
||||
a.log.Warnf("Failed to listen for %s: %v\n", serverAddr.String(), err)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user