From 57d025910d3fe3451088aa9432ea6fba9c9a729f Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 11 Aug 2025 00:20:52 -0700 Subject: [PATCH] cancel context --- weed/admin/handlers/maintenance_handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/admin/handlers/maintenance_handlers.go b/weed/admin/handlers/maintenance_handlers.go index 87fc23d49..20e008f6a 100644 --- a/weed/admin/handlers/maintenance_handlers.go +++ b/weed/admin/handlers/maintenance_handlers.go @@ -62,8 +62,8 @@ func (h *MaintenanceHandlers) ShowTaskDetail(c *gin.Context) { // ShowMaintenanceQueue displays the maintenance queue page func (h *MaintenanceHandlers) ShowMaintenanceQueue(c *gin.Context) { - // Add timeout to prevent hanging - ctx, cancel := context.WithTimeout(c.Request.Context(), 30*time.Second) + // Reduce timeout since we fixed the deadlock issue + ctx, cancel := context.WithTimeout(c.Request.Context(), 10*time.Second) defer cancel() // Use a channel to handle timeout for data retrieval