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

Ability to register/unregister clients to automate server stop #236

Open
watson28 opened this issue Feb 16, 2023 · 3 comments
Open

Ability to register/unregister clients to automate server stop #236

watson28 opened this issue Feb 16, 2023 · 3 comments

Comments

@watson28
Copy link

I have noticed that after closing all the clients that talk to eslint_d, the server keeps running with significant memory usage.

It would be good to have the ability to optionally register a client when talking with eslint_d for the first time. The daemon could keep a list of all clients that are connected. When a client notifies that wants to disconnect, the daemon will check if it's the last one connected and then stop itself.

could this be considered a feature to implement?

@mantoni
Copy link
Owner

mantoni commented Apr 15, 2023

I gave this some thought, and I think you can probably get away with a simpler solution: Instead of introducing "book-keeping" for clients, we could add a command to "flush" or "evict" a cached instance.

Instances are internally associated with a working directory, so a command like eslint_d evict . could remove the cached instance for the project in the current directory. You can then trigger that command when your editor exits.

Would you be interested in contributing this feature?

@victorlacorte
Copy link

victorlacorte commented Jul 13, 2023

Hey @mantoni I'd be interested in contributing to this feature. Do you know if any work has been done since this thread started?

@mantoni
Copy link
Owner

mantoni commented Jul 13, 2023

Awesome! I'm not aware of anyone working on this yet. Let me know if you have any questions. ❤️

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