Merge pull request #1447 from calmh/silencio

Don't yell about discovery listening and resolving (ref #1418)
This commit is contained in:
Audrius Butkevicius 2015-03-11 20:03:37 +00:00
commit 80bffd93e7

View File

@ -94,7 +94,9 @@ func (d *UDPClient) broadcast(pkt []byte) {
conn, err := net.ListenUDP(d.url.Scheme, d.listenAddress) conn, err := net.ListenUDP(d.url.Scheme, d.listenAddress)
for err != nil { for err != nil {
l.Warnf("discover %s: broadcast listen: %v; trying again in %v", d.url, err, d.errorRetryInterval) if debug {
l.Debugf("discover %s: broadcast listen: %v; trying again in %v", d.url, err, d.errorRetryInterval)
}
select { select {
case <-d.stop: case <-d.stop:
return return
@ -106,9 +108,7 @@ func (d *UDPClient) broadcast(pkt []byte) {
remote, err := net.ResolveUDPAddr(d.url.Scheme, d.url.Host) remote, err := net.ResolveUDPAddr(d.url.Scheme, d.url.Host)
for err != nil { for err != nil {
if d.url.Scheme != "udp6" { if debug {
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) l.Debugf("discover %s: broadcast resolve: %v; trying again in %v", d.url, err, d.errorRetryInterval)
} }
select { select {