瀏覽代碼

refactor(syncthing): use named constant for SIGHUP (#10168)

ardevd 4 月之前
父節點
當前提交
c14abebd68
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      cmd/syncthing/main.go

+ 1 - 2
cmd/syncthing/main.go

@@ -613,8 +613,7 @@ func setupSignalHandling(app *syncthing.App) {
 	// Exit cleanly with "restarting" code on SIGHUP.
 
 	restartSign := make(chan os.Signal, 1)
-	sigHup := syscall.Signal(1)
-	signal.Notify(restartSign, sigHup)
+	signal.Notify(restartSign, syscall.SIGHUP)
 	go func() {
 		<-restartSign
 		app.Stop(svcutil.ExitRestart)