[profile] #290 generic rel=me (links table) - favicon timeout

This commit is contained in:
Andrea Vos 2023-01-25 22:36:47 +01:00
parent 47fbb7968d
commit 716fa8195f

View File

@ -61,7 +61,9 @@ class LinkAnalyser {
try {
const fallback = new URL('/favicon.ico', url);
const res = await fetch(fallback);
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 1000);
const res = await fetch(fallback, {signal: controller.signal});
if (res.ok) {
return fallback;
}