diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index 05c0611be..4392fa233 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -86,6 +86,7 @@ func monitorMain() { cmd.Process.Kill() <-exit return + case err = <-exit: if err == nil { // Successfull exit indicates an intentional shutdown @@ -109,9 +110,6 @@ func copyStderr(stderr io.ReadCloser) { for { line, err := br.ReadString('\n') if err != nil { - if err != io.EOF { - l.Warnln("stderr:", err) - } return } @@ -150,9 +148,6 @@ func copyStdout(stderr io.ReadCloser) { for { line, err := br.ReadString('\n') if err != nil { - if err != io.EOF { - l.Warnln("stdout:", err) - } return } diff --git a/discover/discover.go b/discover/discover.go index f4cd98ee8..9434aa66f 100644 --- a/discover/discover.go +++ b/discover/discover.go @@ -65,7 +65,10 @@ func (d *Discoverer) StartLocal(localPort int, localMCAddr string) { if localPort > 0 { bb, err := beacon.NewBroadcast(localPort) if err != nil { - l.Infof("No IPv4 discovery possible (%v)", err) + if debug { + l.Debugln(err) + } + l.Infoln("Local discovery over IPv4 unavailable") } else { d.broadcastBeacon = bb go d.recvAnnouncements(bb) @@ -75,7 +78,10 @@ func (d *Discoverer) StartLocal(localPort int, localMCAddr string) { if len(localMCAddr) > 0 { mb, err := beacon.NewMulticast(localMCAddr) if err != nil { - l.Infof("No IPv6 discovery possible (%v)", err) + if debug { + l.Debugln(err) + } + l.Infoln("Local discovery over IPv6 unavailable") } else { d.multicastBeacon = mb go d.recvAnnouncements(mb) @@ -83,7 +89,7 @@ func (d *Discoverer) StartLocal(localPort int, localMCAddr string) { } if d.broadcastBeacon == nil && d.multicastBeacon == nil { - l.Warnln("No local discovery method available") + l.Warnln("Local discovery unavailable") } else { d.localBcastTick = time.Tick(d.localBcastIntv) d.forcedBcastTick = make(chan time.Time)