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

start and stop by different methods #472

Closed
leo-je opened this issue Jul 27, 2023 · 2 comments
Closed

start and stop by different methods #472

leo-je opened this issue Jul 27, 2023 · 2 comments

Comments

@leo-je
Copy link

leo-je commented Jul 27, 2023

I want to encapsulate two methods, start() and stop(), to control the startup and shutdown of the FTP service, but it seems that I can only start it. How can I implement stop()?

@hannesdejager
Copy link
Collaborator

hannesdejager commented Jul 27, 2023

Hi @leo-je , to strop you can provide a Future to the shutdown_indicator method on Server. You future should then resolve when your stop method is called.

Here is an example in unFTP where we resolve this future when a message is received on a channel.

@hannesdejager
Copy link
Collaborator

@leo-je , hopefully you resolved it by now. I'm closing this.

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

2 participants