Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ending application - cleanup operations #114

Open
andrewufrank opened this issue Aug 23, 2015 · 2 comments
Open

ending application - cleanup operations #114

andrewufrank opened this issue Aug 23, 2015 · 2 comments

Comments

@andrewufrank
Copy link

i cannot find a way to cleanly stop the gui with a button and then execute cleanup actions.
if a have a button to produce an error to force the server to stop . it restarts automatically and the code placed after starting the web server is never reached.
i have a setup function for all gui layout and operations. it returns an action which must run after closing the application.

  1. how can the startGUI return this closing action?
  2. what is the proper way to close the gui with a button?
  3. where must the closing action be placed to run after closing the application (e.g. when closing the window or button click)

thank you!

@HeinrichApfelmus
Copy link
Owner

Right now, there is a disconnect event that fires when the user closes the browser window. You can use this to clean up.

If you want to close the window from the server side, you're currently out of luck, as this hasn't been implemented yet.

@ulysses4ever
Copy link

@HeinrichApfelmus is it still not possible to initiate closing the browser window from the server? Is there a way to shut down the server at least? (I tried liftIOLater exitSuccess but it seems to restart server, not shutdown it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants