This commit is contained in:
parent
2430ddcb8c
commit
43026021f5
@ -19,7 +19,7 @@ module.exports = async (client, apex, app) => {
|
||||
requestPart = async uri => {
|
||||
const ac = new AbortController(),
|
||||
timeout = setTimeout(() => {
|
||||
ac.abort()
|
||||
setImmediate(() => ac.abort())
|
||||
}, constant.abort_timeout),
|
||||
response = await fetch(uri, {
|
||||
headers: { 'User-Agent': constant.agent },
|
||||
@ -27,7 +27,7 @@ module.exports = async (client, apex, app) => {
|
||||
keepalive: false,
|
||||
timeout: constant.timeout,
|
||||
})
|
||||
setImmediate(clearTimeout(timeout))
|
||||
setImmediate(() => clearTimeout(timeout))
|
||||
return await response.json()
|
||||
},
|
||||
scanInstance = async instance => {
|
||||
|
Loading…
Reference in New Issue
Block a user