Ver código fonte

Print error on monitor restart failure

Jakob Borg 11 anos atrás
pai
commit
aba01cdace
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      cmd/syncthing/monitor.go

+ 4 - 1
cmd/syncthing/monitor.go

@@ -99,7 +99,10 @@ func monitorMain() {
 						// binary as part of the upgrade process.
 						l.Infoln("Restarting monitor...")
 						os.Setenv("STNORESTART", "")
-						exec.Command(args[0], args[1:]...).Start()
+						err := exec.Command(args[0], args[1:]...).Start()
+						if err != nil {
+							l.Warnln("restart:", err)
+						}
 						return
 					}
 				}