-
Notifications
You must be signed in to change notification settings - Fork 13
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(client): Fix cleanup of Client._waiters dict #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
In addition, function |
Do you mean creating a set in |
If the waiter is timeout, its callback will discard itself from And I don’t understand why |
Yes, but I didn't consider it a big issue because it only happens when the app crashes, and recovery would require re-instantiating Client anyway, so at this point we don't care about memory. But I see your point now, and I agree it's better to not to leave any dangling references anyway
According to protocol, one-way messages (commands, i.e. But as I can see, currently this is not used in the project. So I think we can simplify this structure, get rid of sets altogether and make it a plain |
Yes, it is.
Note that |
69e8945
to
f04c033
Compare
Ok, made
I suggest to work on this in a next PR |
f04c033
to
2e9e532
Compare
@Gsantomaggio do you mind if I merge this? |
it is ok with me! thank you @qweeze |
fixes #125