mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-31 10:58:27 +00:00
Tone down UPnP errors a little
This commit is contained in:
parent
9359daa0d9
commit
c6300a5da8
@ -175,7 +175,9 @@ Mx: %d
|
||||
|
||||
socket, err := net.ListenMulticastUDP("udp4", intf, &net.UDPAddr{IP: ssdp.IP})
|
||||
if err != nil {
|
||||
l.Infoln(err)
|
||||
if debug {
|
||||
l.Debugln(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
defer socket.Close() // Make sure our socket gets closed
|
||||
@ -206,13 +208,13 @@ Mx: %d
|
||||
n, _, err := socket.ReadFrom(resp)
|
||||
if err != nil {
|
||||
if e, ok := err.(net.Error); !ok || !e.Timeout() {
|
||||
l.Infoln(err) //legitimate error, not a timeout.
|
||||
l.Infoln("UPnP read:", err) //legitimate error, not a timeout.
|
||||
}
|
||||
break
|
||||
}
|
||||
igd, err := parseResponse(deviceType, resp[:n])
|
||||
if err != nil {
|
||||
l.Infoln(err)
|
||||
l.Infoln("UPnP parse:", err)
|
||||
continue
|
||||
}
|
||||
results <- igd
|
||||
|
Loading…
x
Reference in New Issue
Block a user