From 2f08f8021fd23590906282ffed6ccae606222c44 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 12 Oct 2017 07:13:44 +0000 Subject: [PATCH] lib/beacon: Don't exit after a single write failure (fixes #4414) With VPNs and stuff we can get a single failure on an interface that supposedly supports broadcasts without it being fatal. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4415 --- lib/beacon/broadcast.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/beacon/broadcast.go b/lib/beacon/broadcast.go index 0cbb1db0..31e902a1 100644 --- a/lib/beacon/broadcast.go +++ b/lib/beacon/broadcast.go @@ -137,17 +137,11 @@ func (w *broadcastWriter) Serve() { return } - if err, ok := err.(net.Error); ok && err.Temporary() { - // A transient error. Lets hope for better luck in the future. - l.Debugln(err) - continue - } - if err != nil { - // Some other error that we don't expect. Bail and retry. + // Some other error that we don't expect. Debug and continue. l.Debugln(err) w.setError(err) - return + continue } l.Debugf("sent %d bytes to %s", len(bs), dst)