XWX-AI Claude Opus 4.6 commited on
Commit
6213d08
·
1 Parent(s): 78a0140

fix: increase base timeout from 30s to 60s for PDF generation

Browse files

Prevents false timeout errors on text-only exports with external
resource references (fonts, CDN, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. server.js +1 -1
server.js CHANGED
@@ -75,7 +75,7 @@ app.post('/api/generate_pdf', async (req, res) => {
75
  const totalWaitTime = Math.min(baseWaitTime + sizeWaitTime, 8000);
76
 
77
  // 动态计算 waitForNetworkIdle 超时上限
78
- const baseTimeout = 30000;
79
  let extraMs = 0;
80
  if (imgCount <= 30) {
81
  extraMs = imgCount * 3000;
 
75
  const totalWaitTime = Math.min(baseWaitTime + sizeWaitTime, 8000);
76
 
77
  // 动态计算 waitForNetworkIdle 超时上限
78
+ const baseTimeout = 60000;
79
  let extraMs = 0;
80
  if (imgCount <= 30) {
81
  extraMs = imgCount * 3000;