diff --git a/pkg/funcspec/function_api.go b/pkg/funcspec/function_api.go index f348064..ba97b32 100644 --- a/pkg/funcspec/function_api.go +++ b/pkg/funcspec/function_api.go @@ -58,6 +58,9 @@ func (h *Handler) SqlQueryList(sqlquery string, pNoCount, pBlankparms, pAllowFil } }() + // Create local copy to avoid modifying the captured parameter across requests + sqlquery := sqlquery + ctx, cancel := context.WithTimeout(r.Context(), 900*time.Second) defer cancel() @@ -393,6 +396,9 @@ func (h *Handler) SqlQuery(sqlquery string, pBlankparms bool) HTTPFuncType { } }() + // Create local copy to avoid modifying the captured parameter across requests + sqlquery := sqlquery + ctx, cancel := context.WithTimeout(r.Context(), 600*time.Second) defer cancel()