andrewvy / chrome-remote-interface

Elixir Client for the Chrome Debugger Protocol
https://hexdocs.pm/chrome_remote_interface
66 stars 31 forks source link

Handle remote closed #37

Open johns10 opened 2 years ago

johns10 commented 2 years ago

I found a problem while working with my app. When chrome is opened, and then closed manually, I get a {:remote, :closed} termination from WebsockEx. I added a handle_disconnect callback to the WebSocket module, and trapped exits in PageSession so we could handle the remote closing gracefully, and handle it in the supervising process properly.