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

feat: support gracefully shutting down the service... #105

Merged
merged 2 commits into from
Apr 13, 2019

Conversation

driftluo
Copy link
Collaborator

Support gracefully shutting down the service

@driftluo driftluo requested a review from TheWaWaR April 13, 2019 05:06
ServiceTask::Shutdown => {
let ids = self.sessions.keys().cloned().collect::<Vec<SessionId>>();
ids.into_iter()
.for_each(|i| self.session_close(i, Source::External));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.sessions
    .keys()
    .cloned()
    .for_each(|i| self.session_close(i, Source::External));

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Borrow check is attacking 😭

@driftluo driftluo merged commit de913e8 into master Apr 13, 2019
@driftluo driftluo deleted the add-close-command branch April 13, 2019 06:07
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

Successfully merging this pull request may close these issues.

2 participants