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

fix: delete the task if the notifier channel is closed #269

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

kemingy
Copy link
Member

@kemingy kemingy commented Feb 8, 2023

Signed-off-by: Keming kemingy94@gmail.com

This is because when this connection is closed, the corresponding server tokio thread is also dead. So the created notifier channel is closed. Thus we need to delete the task since no one is going to use it.

Also, it's a bit ugly to put the metrics info in this task related method. Welcome other suggestions.

If it looks good, I'll also update the version and release a new one.

Signed-off-by: Keming <kemingy94@gmail.com>
@lkevinzc
Copy link
Member

lkevinzc commented Feb 8, 2023

Also, it's a bit ugly to put the metrics info in this task related method. Welcome other suggestions.

There seems no easy way to avoid this, maybe let's keep it for now?
LGTM!

Signed-off-by: Keming <kemingy94@gmail.com>
@kemingy kemingy merged commit 335ca31 into mosecorg:main Feb 8, 2023
@kemingy kemingy deleted the fix_notifier_close branch February 8, 2023 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] there will be dead tasks in mosec if the client exits before response
2 participants