diff --git a/index.js b/index.js index 550fe88..32e28f5 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ app.get("/cached/*", (req, res) => { var imgWait = 0 function waitForImage() { if (imgWait < imgWaitMax) { - imgWait += 0.5 + imgWait += 0.1 setTimeout(() => { imgData = cachedImages[imgURL] if (imgData) { @@ -31,7 +31,7 @@ app.get("/cached/*", (req, res) => { } else { waitForImage() } - }, 500); + }, 100); } else { fs.createReadStream(path.join(__dirname, "/imgs/notFound.png")).pipe(res) }