mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
Silence discovery warnings when v6 not available (fixes #1418)
This commit is contained in:
parent
e22c873ec4
commit
0c049179b4
@ -94,7 +94,7 @@ func (d *UDPClient) broadcast(pkt []byte) {
|
||||
|
||||
conn, err := net.ListenUDP(d.url.Scheme, d.listenAddress)
|
||||
for err != nil {
|
||||
l.Warnf("discover %s: broadcast: %v; trying again in %v", d.url, err, d.errorRetryInterval)
|
||||
l.Warnf("discover %s: broadcast listen: %v; trying again in %v", d.url, err, d.errorRetryInterval)
|
||||
select {
|
||||
case <-d.stop:
|
||||
return
|
||||
@ -106,7 +106,11 @@ func (d *UDPClient) broadcast(pkt []byte) {
|
||||
|
||||
remote, err := net.ResolveUDPAddr(d.url.Scheme, d.url.Host)
|
||||
for err != nil {
|
||||
l.Warnf("discover %s: broadcast: %v; trying again in %v", d.url, err, d.errorRetryInterval)
|
||||
if d.url.Scheme != "udp6" {
|
||||
l.Warnf("discover %s: broadcast resolve: %v; trying again in %v", d.url, err, d.errorRetryInterval)
|
||||
} else if debug {
|
||||
l.Debugf("discover %s: broadcast resolve: %v; trying again in %v", d.url, err, d.errorRetryInterval)
|
||||
}
|
||||
select {
|
||||
case <-d.stop:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user