capture-website icon indicating copy to clipboard operation
capture-website copied to clipboard

page.close() and browser.close() should be in try-catch-finally block

Open ropel opened this issue 3 years ago • 4 comments

Everytime something goes wrong capturing a screenshot (i.e. no response, timeouts, ...) the function exits without closing page and browser, so that chrome instances keep growing until server dies. Putting page.close() and browser.close() in a "finally" block should avoid resources leaking

ropel avatar Sep 29 '21 08:09 ropel

I agree. Pull request welcome.

sindresorhus avatar Oct 02 '21 09:10 sindresorhus

Ok, pull request done

ropel avatar Oct 06 '21 10:10 ropel

Ok, pull request done

Is this issue resolved?

jopemachine avatar Jan 09 '22 15:01 jopemachine

Was this ever merged? Because I'm having zombie processes and I imagine it's because of this

AlejandroAkbal avatar Apr 08 '24 08:04 AlejandroAkbal