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

QuiescingHelper init & forget will crash your program #166

Open
weissi opened this issue Jul 4, 2022 · 1 comment
Open

QuiescingHelper init & forget will crash your program #166

weissi opened this issue Jul 4, 2022 · 1 comment

Comments

@weissi
Copy link
Member

weissi commented Jul 4, 2022

self.channelCollectorPromise = group.next().makePromise()

If you create a new QuiescingHelper() but then end up not using it, it'll crash your program for a leaked promise. There's probably a better solution for that. If it should remain the API contract we can probably give the user a better message than the leaked promise?

@Lukasa
Copy link
Contributor

Lukasa commented Jul 4, 2022

Hmm, the API contract absolutely requires that you call makeServerChannelHandler exactly once. We can probably enforce that constraint using an atomic bool or a lock.

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