check to see if backend server dies
This commit is contained in:
parent
52e35b2ca4
commit
f8eefd5c72
2 changed files with 4 additions and 2 deletions
|
@ -100,7 +100,7 @@ func backendServer() {
|
|||
srv.Accept(lis)
|
||||
}
|
||||
|
||||
func startBackendServer() {
|
||||
func runBackendServer() {
|
||||
proc := exec.Command(os.Args[0], "-datadir", dataDir, "backend")
|
||||
proc.Stdout = os.Stdout
|
||||
proc.Stderr = os.Stderr
|
||||
|
@ -108,4 +108,6 @@ func startBackendServer() {
|
|||
if err != nil {
|
||||
log.Panicf("can't exec backend: %s", err)
|
||||
}
|
||||
err = proc.Wait()
|
||||
log.Panicf("lost the backend: %s", err)
|
||||
}
|
||||
|
|
2
web.go
2
web.go
|
@ -2325,7 +2325,7 @@ func serve() {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
startBackendServer()
|
||||
go runBackendServer()
|
||||
go enditall()
|
||||
go redeliverator()
|
||||
go tracker()
|
||||
|
|
Loading…
Reference in a new issue