Skip to content

Commit

Permalink
fix(getScriptContent): 目前的搜索容易超时报错 #2049
Browse files Browse the repository at this point in the history
  • Loading branch information
fzlins committed Nov 11, 2024
1 parent 6c75e27 commit d0daff4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/service/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
import { PPF } from "./public";
import "./favicon";

// limit the number of concurrent connections to 8
import pLimit from 'p-limit';
const limit = pLimit(8);

let rootPath = "";
let isExtensionMode = false;
Expand Down Expand Up @@ -269,7 +272,8 @@ export const APP = {
APP.debugMode && console.log("getScriptContent", url);
return $.ajax({
url,
dataType: "text"
dataType: "text",
timeout: 60000 // Set timeout to 60 seconds (60000 milliseconds)
});
},
/**
Expand Down

0 comments on commit d0daff4

Please sign in to comment.