Skip to content

Commit aca6e9d

Browse files
author
Hugo Arregui
committed
Fix connection nil pointer
Don't assume connection is present if there is an error in listenUDP
1 parent 953f36f commit aca6e9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gather.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func (a *Agent) gatherCandidatesSrflx(urls []*URL, networkTypes []NetworkType) {
244244

245245
conn, err := a.listenUDP(int(a.portmax), int(a.portmin), network, &net.UDPAddr{IP: nil, Port: 0})
246246
if err != nil {
247-
a.log.Warnf("Failed to listen on %s for %s: %v\n", conn.LocalAddr().String(), serverAddr.String(), err)
247+
a.log.Warnf("Failed to listen for %s: %v\n", serverAddr.String(), err)
248248
continue
249249
}
250250

0 commit comments

Comments
 (0)