clearTimeout(timeout)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ale 2024-09-26 01:30:49 +02:00
parent 74d6f6d488
commit 9e728583c4

View File

@ -18,16 +18,17 @@ module.exports = async (client, apex, app) => {
}
},
requestPart = async uri => {
const ac = new AbortController()
setTimeout(() => {
ac.abort()
}, constant.abort_timeout)
const ac = new AbortController(),
timeout = setTimeout(() => {
ac.abort()
}, constant.abort_timeout)
const response = await fetch(uri, {
headers: { 'User-Agent': constant.agent },
signal: ac.signal,
keepalive: false,
timeout: constant.timeout,
})
clearTimeout(timeout)
return await response.json()
},
scanInstance = async instance => {