all, vendor: Switch back to non-forked thejerf/suture (#5171)

This commit is contained in:
Jakob Borg
2018-09-08 11:56:56 +02:00
committed by Audrius Butkevicius
parent 8aa2d8d92c
commit 9e00b619ab
18 changed files with 47 additions and 44 deletions

View File

@@ -10,7 +10,7 @@ import (
"net"
stdsync "sync"
"github.com/calmh/suture"
"github.com/thejerf/suture"
)
type recv struct {

View File

@@ -11,8 +11,8 @@ import (
"net"
"time"
"github.com/calmh/suture"
"github.com/syncthing/syncthing/lib/sync"
"github.com/thejerf/suture"
)
type Broadcast struct {
@@ -36,7 +36,7 @@ func NewBroadcast(port int) *Broadcast {
Log: func(line string) {
l.Debugln(line)
},
PanicPanics: true,
PassThroughPanics: true,
}),
port: port,
inbox: make(chan []byte),

View File

@@ -12,7 +12,7 @@ import (
"net"
"time"
"github.com/calmh/suture"
"github.com/thejerf/suture"
"golang.org/x/net/ipv6"
)
@@ -36,7 +36,7 @@ func NewMulticast(addr string) *Multicast {
Log: func(line string) {
l.Debugln(line)
},
PanicPanics: true,
PassThroughPanics: true,
}),
inbox: make(chan []byte),
outbox: make(chan recv, 16),

View File

@@ -30,7 +30,7 @@ import (
_ "github.com/syncthing/syncthing/lib/pmp"
_ "github.com/syncthing/syncthing/lib/upnp"
"github.com/calmh/suture"
"github.com/thejerf/suture"
"golang.org/x/time/rate"
)
@@ -105,7 +105,7 @@ func NewService(cfg *config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *
Log: func(line string) {
l.Infoln(line)
},
PanicPanics: true,
PassThroughPanics: true,
}),
cfg: cfg,
myID: myID,
@@ -130,9 +130,9 @@ func NewService(cfg *config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *
Log: func(line string) {
l.Infoln(line)
},
FailureThreshold: 2,
FailureBackoff: 600 * time.Second,
PanicPanics: true,
FailureThreshold: 2,
FailureBackoff: 600 * time.Second,
PassThroughPanics: true,
}),
}
cfg.Subscribe(service)

View File

@@ -10,10 +10,10 @@ import (
stdsync "sync"
"time"
"github.com/calmh/suture"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/syncthing/syncthing/lib/sync"
"github.com/syncthing/syncthing/lib/util"
"github.com/thejerf/suture"
)
// The CachingMux aggregates results from multiple Finders. Each Finder has
@@ -52,7 +52,7 @@ type cachedError interface {
func NewCachingMux() CachingMux {
return &cachingMux{
Supervisor: suture.New("discover.cachingMux", suture.Spec{
PanicPanics: true,
PassThroughPanics: true,
}),
mut: sync.NewRWMutex(),
}

View File

@@ -9,8 +9,8 @@ package discover
import (
"time"
"github.com/calmh/suture"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/thejerf/suture"
)
// A Finder provides lookup services of some kind.

View File

@@ -18,11 +18,11 @@ import (
"strconv"
"time"
"github.com/calmh/suture"
"github.com/syncthing/syncthing/lib/beacon"
"github.com/syncthing/syncthing/lib/events"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/syncthing/syncthing/lib/rand"
"github.com/thejerf/suture"
)
type localClient struct {
@@ -49,7 +49,7 @@ const (
func NewLocal(id protocol.DeviceID, addr string, addrList AddressLister) (FinderService, error) {
c := &localClient{
Supervisor: suture.New("local", suture.Spec{
PanicPanics: true,
PassThroughPanics: true,
}),
myID: id,
addrList: addrList,

View File

@@ -22,7 +22,6 @@ import (
"strings"
"time"
"github.com/calmh/suture"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/connections"
"github.com/syncthing/syncthing/lib/db"
@@ -36,6 +35,7 @@ import (
"github.com/syncthing/syncthing/lib/sync"
"github.com/syncthing/syncthing/lib/upgrade"
"github.com/syncthing/syncthing/lib/versioner"
"github.com/thejerf/suture"
)
var locationLocal *time.Location
@@ -136,7 +136,7 @@ func NewModel(cfg *config.Wrapper, id protocol.DeviceID, clientName, clientVersi
Log: func(line string) {
l.Debugln(line)
},
PanicPanics: true,
PassThroughPanics: true,
}),
cfg: cfg,
db: ldb,