Skip to content

Commit

Permalink
fix withTimeout ptoblem
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmehrdad committed Feb 7, 2025
1 parent a64b6e7 commit 7ff1822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ func main() {
signal.Notify(stop, os.Interrupt, syscall.SIGTERM)
<-stop

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()
if err := srv.Shutdown(ctx); err != nil {
log.Printf("Server shutdown error: %v", err)
Expand Down

0 comments on commit 7ff1822

Please sign in to comment.