remove waring

This commit is contained in:
Kenta420-Poom 2023-09-20 10:42:14 +07:00
parent d8f9858ea0
commit 35b8b3be57

View file

@ -18,12 +18,13 @@ func main() {
go func() {
<-sig
shutdownCtx, _ := context.WithTimeout(serverCtx, 30*time.Second)
shutdownCtx, cancel := context.WithTimeout(serverCtx, 30*time.Second)
go func() {
<-shutdownCtx.Done()
if shutdownCtx.Err() == context.DeadlineExceeded {
log.Println("Shutdown timeout, force exit")
cancel()
}
}()