mirror of
https://github.com/catdevnull/transicion-desordenada-diablo
synced 2024-11-15 02:21:39 +00:00
fix: arreglar uso de promises
This commit is contained in:
parent
697eb887cf
commit
64b1c8550d
1 changed files with 3 additions and 4 deletions
|
@ -65,8 +65,9 @@ function wait(ms) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {URL} url
|
* @param {URL} url
|
||||||
|
* @returns {Promise<Dispatcher.ResponseData>}
|
||||||
*/
|
*/
|
||||||
async function _customRequestWithLimits(url) {
|
function _customRequestWithLimits(url) {
|
||||||
let limit = limiters.get(url.host);
|
let limit = limiters.get(url.host);
|
||||||
if (!limit) {
|
if (!limit) {
|
||||||
limit = pLimit(
|
limit = pLimit(
|
||||||
|
@ -75,9 +76,7 @@ async function _customRequestWithLimits(url) {
|
||||||
);
|
);
|
||||||
limiters.set(url.host, limit);
|
limiters.set(url.host, limit);
|
||||||
}
|
}
|
||||||
return limit(async () => {
|
return limit(() => _customRequest(url));
|
||||||
return await _customRequest(url);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue