diff --git a/src/lib/utils/http_utils.ts b/src/lib/utils/http_utils.ts index 24b3934b..63ceee0f 100644 --- a/src/lib/utils/http_utils.ts +++ b/src/lib/utils/http_utils.ts @@ -13,7 +13,10 @@ export default class HttpUtils { log.debug(`FETCH ${url} - GET`) for (let t = 1; t <= tries; t++) { try { - let response = await fetch(url) + const c = new AbortController(); + const id = setTimeout(() => c.abort(), 1000); + let response = await fetch(url, {signal: c.signal}); + clearTimeout(id); if (response) { log.debug(`FETCH ${url} - RESP - STATUS ${response.status} - ${response.statusText}`)