rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.68k stars 119 forks source link

Gracefully shutdown the browser on `.quit` #448

Closed sloanesturz closed 4 months ago

sloanesturz commented 4 months ago

Fixes #418 - https://github.com/rubycdp/ferrum/issues/418#issuecomment-1960822066

In my application, I found that my sessions to my Browserless server were staying open after I called .quit. When I invoke this command, the sessions more gracefully exit and the server gives back its resources.

route commented 4 months ago

Merged manually with changes. I only wanted it to be a dedicated command. quit handles it completely different from ruby side, close closes it from browser side.