mirror of
https://github.com/catdevnull/transicion-desordenada-diablo
synced 2024-11-14 18:21:38 +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
|
||||
* @returns {Promise<Dispatcher.ResponseData>}
|
||||
*/
|
||||
async function _customRequestWithLimits(url) {
|
||||
function _customRequestWithLimits(url) {
|
||||
let limit = limiters.get(url.host);
|
||||
if (!limit) {
|
||||
limit = pLimit(
|
||||
|
@ -75,9 +76,7 @@ async function _customRequestWithLimits(url) {
|
|||
);
|
||||
limiters.set(url.host, limit);
|
||||
}
|
||||
return limit(async () => {
|
||||
return await _customRequest(url);
|
||||
});
|
||||
return limit(() => _customRequest(url));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue