This commit is contained in:
parent
74d6f6d488
commit
9e728583c4
@ -18,8 +18,8 @@ module.exports = async (client, apex, app) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
requestPart = async uri => {
|
requestPart = async uri => {
|
||||||
const ac = new AbortController()
|
const ac = new AbortController(),
|
||||||
setTimeout(() => {
|
timeout = setTimeout(() => {
|
||||||
ac.abort()
|
ac.abort()
|
||||||
}, constant.abort_timeout)
|
}, constant.abort_timeout)
|
||||||
const response = await fetch(uri, {
|
const response = await fetch(uri, {
|
||||||
@ -28,6 +28,7 @@ module.exports = async (client, apex, app) => {
|
|||||||
keepalive: false,
|
keepalive: false,
|
||||||
timeout: constant.timeout,
|
timeout: constant.timeout,
|
||||||
})
|
})
|
||||||
|
clearTimeout(timeout)
|
||||||
return await response.json()
|
return await response.json()
|
||||||
},
|
},
|
||||||
scanInstance = async instance => {
|
scanInstance = async instance => {
|
||||||
|
Loading…
Reference in New Issue
Block a user