mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
Merge pull request #1423 from AudriusButkevicius/warn
Silence discovery warnings when v6 not available
This commit is contained in:
commit
3a19fe3663
@ -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