From 194f819f6c8d688f95ccd020875d10597cc5641c Mon Sep 17 00:00:00 2001 From: ale Date: Tue, 8 Oct 2024 17:05:30 +0200 Subject: [PATCH] refactor requestPart --- lib/fediblock.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/fediblock.js b/lib/fediblock.js index 4f1ddd3..d9ca237 100644 --- a/lib/fediblock.js +++ b/lib/fediblock.js @@ -27,6 +27,10 @@ module.exports = async (client, apex, app) => { signal: ac.signal, keepalive: false, timeout: constant.timeout, + cache: 'no-cache', + mode: 'same-origin', + priority: 'high', + redirect: 'follow' }) setImmediate(() => clearTimeout(timeout)) return await response.json() @@ -34,8 +38,8 @@ module.exports = async (client, apex, app) => { setImmediate(() => { clearTimeout(timeout) ac.abort() + return }) - return // console.error(e) } }, @@ -117,7 +121,7 @@ module.exports = async (client, apex, app) => { app.locals.peers++ await scanInstance(instance) } catch (e) { - console.error(e) + console.error('Index ' + index + ':' + instance + ': ' + e) } } yield 0