Tone down insignificant discovery error messages (ref #241)

This commit is contained in:
Jakob Borg 2014-09-08 09:14:21 +02:00
parent 0a70e0b7b6
commit 2117d1d035
2 changed files with 10 additions and 9 deletions

View File

@ -86,6 +86,7 @@ func monitorMain() {
cmd.Process.Kill() cmd.Process.Kill()
<-exit <-exit
return return
case err = <-exit: case err = <-exit:
if err == nil { if err == nil {
// Successfull exit indicates an intentional shutdown // Successfull exit indicates an intentional shutdown
@ -109,9 +110,6 @@ func copyStderr(stderr io.ReadCloser) {
for { for {
line, err := br.ReadString('\n') line, err := br.ReadString('\n')
if err != nil { if err != nil {
if err != io.EOF {
l.Warnln("stderr:", err)
}
return return
} }
@ -150,9 +148,6 @@ func copyStdout(stderr io.ReadCloser) {
for { for {
line, err := br.ReadString('\n') line, err := br.ReadString('\n')
if err != nil { if err != nil {
if err != io.EOF {
l.Warnln("stdout:", err)
}
return return
} }

View File

@ -65,7 +65,10 @@ func (d *Discoverer) StartLocal(localPort int, localMCAddr string) {
if localPort > 0 { if localPort > 0 {
bb, err := beacon.NewBroadcast(localPort) bb, err := beacon.NewBroadcast(localPort)
if err != nil { if err != nil {
l.Infof("No IPv4 discovery possible (%v)", err) if debug {
l.Debugln(err)
}
l.Infoln("Local discovery over IPv4 unavailable")
} else { } else {
d.broadcastBeacon = bb d.broadcastBeacon = bb
go d.recvAnnouncements(bb) go d.recvAnnouncements(bb)
@ -75,7 +78,10 @@ func (d *Discoverer) StartLocal(localPort int, localMCAddr string) {
if len(localMCAddr) > 0 { if len(localMCAddr) > 0 {
mb, err := beacon.NewMulticast(localMCAddr) mb, err := beacon.NewMulticast(localMCAddr)
if err != nil { if err != nil {
l.Infof("No IPv6 discovery possible (%v)", err) if debug {
l.Debugln(err)
}
l.Infoln("Local discovery over IPv6 unavailable")
} else { } else {
d.multicastBeacon = mb d.multicastBeacon = mb
go d.recvAnnouncements(mb) go d.recvAnnouncements(mb)
@ -83,7 +89,7 @@ func (d *Discoverer) StartLocal(localPort int, localMCAddr string) {
} }
if d.broadcastBeacon == nil && d.multicastBeacon == nil { if d.broadcastBeacon == nil && d.multicastBeacon == nil {
l.Warnln("No local discovery method available") l.Warnln("Local discovery unavailable")
} else { } else {
d.localBcastTick = time.Tick(d.localBcastIntv) d.localBcastTick = time.Tick(d.localBcastIntv)
d.forcedBcastTick = make(chan time.Time) d.forcedBcastTick = make(chan time.Time)