refactor(api): rename shutdown ctx to shutdownCtx for clarity

This commit is contained in:
2026-06-09 00:22:01 +02:00
parent 76389406c7
commit 0f0ba04647

View File

@@ -178,10 +178,10 @@ func main() {
log.Println("Server is shutting down...")
// Graceful shutdown with 30 second timeout
ctx, cancel = context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), 30*time.Second)
defer shutdownCancel()
if err := server.Shutdown(ctx); err != nil {
if err := server.Shutdown(shutdownCtx); err != nil {
log.Fatalf("Server forced to shutdown: %v", err)
}