From a6d2990e7a950c2d43b8a1ff5118047a3f8ae1f0 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Mon, 3 Jun 2024 00:07:36 -0500 Subject: [PATCH] Wait faster lol --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }