I'm running a shiny app locally, starting it from a vbs script. Is there a way to end the app when the user closes the browser window? Something like end when it detects a connection reset. It looks like it can detect resets because i get the following when closing the browser while running the app from R:
ERROR: [on_request_read] connection reset by peer