dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 12cd5ff4f726dfb254fa51390792d545cd58b688
parent be3b394a9509df295a82d0eae98bf004eaf05b4a
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 23 May 2023 23:20:52 -0700

handle SIGTERM as well as SIGINT

Diffstat:
Mpkg/web/handlers/handlers.go | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -37,6 +37,7 @@ import ( "strconv" "strings" "sync" + "syscall" "time" "unicode/utf8" @@ -4815,7 +4816,7 @@ func ChessGameHandler(c echo.Context) error { }) notify1 := make(chan os.Signal) - signal.Notify(notify1, os.Interrupt) + signal.Notify(notify1, syscall.SIGINT, syscall.SIGTERM) utils.SGo(func() { select { case <-notify1: @@ -4951,7 +4952,7 @@ func ChatStreamMessagesHandler(c echo.Context) error { }) notify1 := make(chan os.Signal) - signal.Notify(notify1, os.Interrupt) + signal.Notify(notify1, syscall.SIGINT, syscall.SIGTERM) utils.SGo(func() { select { case <-notify1: