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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure all listeners are cleaned up on ServiceBrowser cancelation #290
Conversation
e3772ec
to
8569101
Compare
I added coverage for the areas that were previously not actually covered with assertions. |
May be one of the causes of home-assistant/core#38862 |
dbc568a
to
7251dc7
Compare
When creating listeners for a ServiceBrowser with multiple types they would not all be removed on cancelation. This led to a build up of stale listeners when ServiceBrowsers were frequently added and removed.
7251dc7
to
28a2d16
Compare
@jstasiak If you have a moment, could we get a release bump with this fix. I'm trying to close out home-assistant/core#38862 and home-assistant/core#38933 and this is the one of the last ones to be resolved. |
zeroconf/test.py
Outdated
@@ -860,6 +861,20 @@ def test_cache_empty_does_not_leak_memory_by_leaving_empty_list(self): | |||
cache.remove(record2) | |||
assert 'a' not in cache.cache | |||
|
|||
def test_cache_empty_multiple_calls_does_not_throw(self): |
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.
Does this patch actually fix something that's verified by this test? Let's keep this out of this pull request if that's not the case.
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.
I'll pull it out. It should probably go in a new PR after this merges
Sure, I'll make a release after merging. |
Just released as 0.28.1. :) |
TYVM |
Sorry I missed this in the original submission #249. 馃檴
When creating listeners for a ServiceBrowser with multiple types
they would not all be removed on cancelation. This led
to a build up of stale listeners when ServiceBrowsers were
frequently added and removed.