Skip to content

Commit

Permalink
Add support For undici Garbage Collector
Browse files Browse the repository at this point in the history
  • Loading branch information
ToddyTheNoobDud authored Dec 18, 2024
1 parent 49adef0 commit 2dc9be9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build/handlers/fetchImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ async function getImageUrl(info) {
async function fetchThumbnail(url) {
try {
const response = await request(url, { method: "GET" });
const json = await response.json();
response.body.destroy();

const json = await response.body.json();
response.body.dump();
return json.thumbnail_url || null;
} catch (error) {
console.error(`Error fetching ${url}:`, error);
Expand Down

0 comments on commit 2dc9be9

Please sign in to comment.