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

Managed servers? #210

Open
nicopernas opened this issue Sep 1, 2022 · 0 comments
Open

Managed servers? #210

nicopernas opened this issue Sep 1, 2022 · 0 comments

Comments

@nicopernas
Copy link

nicopernas commented Sep 1, 2022

We've just started using this library and it's great. Thanks for developing and maintaining it.

One feature that we are missing though is managed servers. Right now, the (RPC) client is in charge of terminating the connection with the server once it's done using it. In our use case, we don't have a clear place where to make that call so we end up having multiple orphaned server processes lying around.

The way we solved it was to have the plugin (server) check for its parent process pid ever X seconds. When it detects a change we asume it is because the original parent (the RPC client) is gone (or we can check wether the parent pid is 1)

That works just fine. However, there's no easy way for us to clean up the socket files when we exit so they accumulate over time.

I was wondering about a feature where the server could be managed (just like the clients) where they do exactly what I mentioned above: if they detect their original parent process changes, it gracefully exits.

I'm happy to send a PR, just wanted to test the waters first. Thanks

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

No branches or pull requests

1 participant