Close extra browser instances too

I'm seeing a lot of 500 "Could not load image: undefined" lately, not sure why! Wondering if it's resources staying open too long, idk. This should at least be better than leaving it open!
This commit is contained in:
Emi Matchu 2021-09-03 13:44:19 -07:00
parent 7e0b3b39e7
commit 443cf3fc26

View file

@ -122,8 +122,9 @@ async function loadAndScreenshotImage(libraryUrl, size) {
);
}
} finally {
// Close the page, to save on RAM in our shared browser instance.
// Tear down our resources when we're done!
page.close();
browser.close();
}
}