Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Hook to server termination #248

Open
laughedelic opened this issue Dec 2, 2018 · 4 comments
Open

Hook to server termination #248

laughedelic opened this issue Dec 2, 2018 · 4 comments

Comments

@laughedelic
Copy link
Contributor

There are methods like preInitialization and postInitialization, but I don't see any way to hook to the shutdown routine and perform some cleanup actions. I see exitCleanup method, but it's private.

@Aerijo
Copy link
Contributor

Aerijo commented Mar 6, 2019

@laughedelic Would this be when the server is intentionally closed, or if it crashes and is restarted as well?

@laughedelic
Copy link
Contributor Author

@Aerijo when it's intentionally closed (which also covers restart).

My use case was that I create a status bar element to show some info from the server and when the server terminates I want to remove this element to avoid showing an outdated state. Otherwise it just gets stuck there.

@alexheretic
Copy link
Contributor

In ide-rust I used:

postInitialization(server) {
  ...
  server.process.on('exit', () => { ... })
}

@UziTech
Copy link

UziTech commented Oct 19, 2020

Development of atom-languageclient has officially moved to https://github.com/atom-ide-community/atom-languageclient 🎉

If this is still an issue please consider opening an issue on that repo.

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

No branches or pull requests

4 participants