Skip to content

fix: remove useless calls in ServiceInfo#1248

Merged
bdraco merged 3 commits into
masterfrom
info_load_from_cache
Sep 2, 2023
Merged

fix: remove useless calls in ServiceInfo#1248
bdraco merged 3 commits into
masterfrom
info_load_from_cache

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented Sep 2, 2023

_set_ipv4_addresses_from_cache and _set_ipv6_addresses_from_cache were useless calls because they would always load the same data that was being fed into the function from load_from_cache or nothing if there was nothing in the cache. Removing them has the same result because the data was being loaded twice when there was data in the cache.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 2, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
src/zeroconf/__init__.py 100.00%
src/zeroconf/_services/info.py 100.00%

📢 Thoughts on this report? Let us know!.

@bdraco bdraco changed the title fix: ServiceInfo could fail to load IPv4 records from cache fix: remove useless calls in ServiceInfo Sep 2, 2023
@bdraco bdraco force-pushed the info_load_from_cache branch from c336a49 to 516812e Compare September 2, 2023 04:28
@bdraco bdraco marked this pull request as ready for review September 2, 2023 04:49
@bdraco bdraco merged commit 4e40fae into master Sep 2, 2023
@bdraco bdraco deleted the info_load_from_cache branch September 2, 2023 04:49
@bdraco bdraco restored the info_load_from_cache branch September 2, 2023 04:53
@bdraco bdraco deleted the info_load_from_cache branch September 2, 2023 04:54
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.

1 participant