Skip to content

Commit 220b768

Browse files
committed
fix: catch process termination signal to clear socket file
1 parent 59a377f commit 220b768

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"net"
88
"net/http"
9-
"os"
109
"os/signal"
10+
"syscall"
1111

1212
"code.pfad.fr/risefront"
1313
"github.com/0xJacky/Nginx-UI/internal/kernel"
@@ -69,7 +69,7 @@ func main() {
6969

7070
settings.Init(confPath)
7171

72-
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
72+
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
7373
defer cancel()
7474

7575
err := risefront.New(ctx, risefront.Config{

0 commit comments

Comments
 (0)