Fork with new option.
This commit is contained in:
@@ -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
|
||||
@@ -51,8 +51,10 @@ type cachedError interface {
|
||||
|
||||
func NewCachingMux() CachingMux {
|
||||
return &cachingMux{
|
||||
Supervisor: suture.NewSimple("discover.cachingMux"),
|
||||
mut: sync.NewRWMutex(),
|
||||
Supervisor: suture.New("discover.cachingMux", suture.Spec{
|
||||
PanicPanics: true,
|
||||
}),
|
||||
mut: sync.NewRWMutex(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
@@ -48,7 +48,9 @@ const (
|
||||
|
||||
func NewLocal(id protocol.DeviceID, addr string, addrList AddressLister) (FinderService, error) {
|
||||
c := &localClient{
|
||||
Supervisor: suture.NewSimple("local"),
|
||||
Supervisor: suture.New("local", suture.Spec{
|
||||
PanicPanics: true,
|
||||
}),
|
||||
myID: id,
|
||||
addrList: addrList,
|
||||
localBcastTick: time.NewTicker(BroadcastInterval).C,
|
||||
|
||||
Reference in New Issue
Block a user