all: Don't let Suture capture panics (fixes #4758) (#5119)

Fork with new option.
This commit is contained in:
Jakob Borg
2018-08-13 20:39:08 +02:00
committed by GitHub
parent c55c0c8c28
commit 48795dba07
18 changed files with 63 additions and 37 deletions

View File

@@ -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()