Wait faster lol

This commit is contained in:
bingus_violet 2024-06-03 00:07:36 -05:00
parent c53f669aad
commit a6d2990e7a

View file

@ -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)
}