In R, there are solutions to stop the App when the user closes the browser, such as
# in server.R
session$onSessionEnded(function() { stopApp() })
Is there some similar solution for python ?
I found this proposed solution, but it doesn't seem to work:
# In server: this closes the session when the user exits out on their browser
@reactive.Effect
@reactive.event(input.close)
async def _():
await session.close()