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

Add a way to disconnect RelayConsumer without sending SIGINT or SIGTERM #284

Open
Tyler-Murphy opened this issue Apr 8, 2021 · 2 comments

Comments

@Tyler-Murphy
Copy link

I'd like to be able to disconnect without having to kill other stuff that runs in the same process and listens for the same signals. It's more convenient than having to run the RelayConsumer in its own process in some cases.

It looks like there's a protected client property with the disconnect method that might do the trick if it weren't protected.

@edolix
Copy link
Contributor

edolix commented Apr 9, 2021

Hi @Tyler-Murphy!

A RelayConsumer should run on it own process and we decided to not expose the underlay client object.
We can for sure add a way to disconnect it without using signals in the next version.

For now, as a workaround, you can still use the disconnect method from the protected client ignoring the line in TS (// @ts-ignore).

@Tyler-Murphy
Copy link
Author

Cool, thanks! I'm using @ts-expect-error for now, but it'd be nice not to bypass type checks in the long run.

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

2 participants