mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 22:18:14 -05:00
refactor(syncthing): use named constant for SIGHUP (#10168)
This commit is contained in:
@@ -613,8 +613,7 @@ func setupSignalHandling(app *syncthing.App) {
|
|||||||
// Exit cleanly with "restarting" code on SIGHUP.
|
// Exit cleanly with "restarting" code on SIGHUP.
|
||||||
|
|
||||||
restartSign := make(chan os.Signal, 1)
|
restartSign := make(chan os.Signal, 1)
|
||||||
sigHup := syscall.Signal(1)
|
signal.Notify(restartSign, syscall.SIGHUP)
|
||||||
signal.Notify(restartSign, sigHup)
|
|
||||||
go func() {
|
go func() {
|
||||||
<-restartSign
|
<-restartSign
|
||||||
app.Stop(svcutil.ExitRestart)
|
app.Stop(svcutil.ExitRestart)
|
||||||
|
|||||||
Reference in New Issue
Block a user