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:
parent
7e0b3b39e7
commit
443cf3fc26
1 changed files with 2 additions and 1 deletions
|
@ -122,8 +122,9 @@ async function loadAndScreenshotImage(libraryUrl, size) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// Close the page, to save on RAM in our shared browser instance.
|
// Tear down our resources when we're done!
|
||||||
page.close();
|
page.close();
|
||||||
|
browser.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue