Fork with new option.
This commit is contained in:
@@ -23,13 +23,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/calmh/suture"
|
||||
"github.com/d4l3k/messagediff"
|
||||
"github.com/syncthing/syncthing/lib/config"
|
||||
"github.com/syncthing/syncthing/lib/events"
|
||||
"github.com/syncthing/syncthing/lib/fs"
|
||||
"github.com/syncthing/syncthing/lib/protocol"
|
||||
"github.com/syncthing/syncthing/lib/sync"
|
||||
"github.com/thejerf/suture"
|
||||
)
|
||||
|
||||
func TestCSRFToken(t *testing.T) {
|
||||
@@ -77,7 +77,9 @@ func TestStopAfterBrokenConfig(t *testing.T) {
|
||||
srv := newAPIService(protocol.LocalDeviceID, w, "../../test/h1/https-cert.pem", "../../test/h1/https-key.pem", "", nil, nil, nil, nil, nil, nil, nil, nil)
|
||||
srv.started = make(chan string)
|
||||
|
||||
sup := suture.NewSimple("test")
|
||||
sup := suture.New("test", suture.Spec{
|
||||
PanicPanics: true,
|
||||
})
|
||||
sup.Add(srv)
|
||||
sup.ServeBackground()
|
||||
|
||||
@@ -487,7 +489,9 @@ func startHTTP(cfg *mockedConfig) (string, error) {
|
||||
svc.started = addrChan
|
||||
|
||||
// Actually start the API service
|
||||
supervisor := suture.NewSimple("API test")
|
||||
supervisor := suture.New("API test", suture.Spec{
|
||||
PanicPanics: true,
|
||||
})
|
||||
supervisor.Add(svc)
|
||||
supervisor.ServeBackground()
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/tlsutil"
|
||||
"github.com/syncthing/syncthing/lib/upgrade"
|
||||
|
||||
"github.com/thejerf/suture"
|
||||
"github.com/calmh/suture"
|
||||
|
||||
_ "net/http/pprof" // Need to import this to support STPROFILER.
|
||||
)
|
||||
@@ -594,6 +594,7 @@ func syncthingMain(runtimeOptions RuntimeOptions) {
|
||||
Log: func(line string) {
|
||||
l.Debugln(line)
|
||||
},
|
||||
PanicPanics: true,
|
||||
})
|
||||
mainService.ServeBackground()
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ package main
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/calmh/suture"
|
||||
"github.com/syncthing/syncthing/lib/events"
|
||||
"github.com/syncthing/syncthing/lib/protocol"
|
||||
"github.com/syncthing/syncthing/lib/sync"
|
||||
"github.com/thejerf/suture"
|
||||
)
|
||||
|
||||
// The folderSummaryService adds summary information events (FolderSummary and
|
||||
@@ -36,7 +36,9 @@ type folderSummaryService struct {
|
||||
|
||||
func newFolderSummaryService(cfg configIntf, m modelIntf) *folderSummaryService {
|
||||
service := &folderSummaryService{
|
||||
Supervisor: suture.NewSimple("folderSummaryService"),
|
||||
Supervisor: suture.New("folderSummaryService", suture.Spec{
|
||||
PanicPanics: true,
|
||||
}),
|
||||
cfg: cfg,
|
||||
model: m,
|
||||
stop: make(chan struct{}),
|
||||
|
||||
Reference in New Issue
Block a user