8000 ServiceBrowser can call update_service after calling remove_service · Issue #1048 · python-zeroconf/python-zeroconf · GitHub
[go: up one dir, main page]

Skip to content

ServiceBrowser can call update_service after calling remove_service #1048

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

Open
natedogith1 opened this issue Jan 11, 2022 · 1 comment
Open

Comments

@natedogith1
Copy link

It's possible for ServiceBrowser to call update_service after calling remove_service. After adding a bunch of print statements, I think what is happening is:

  1. the remove event is triggered
  2. the remove event is moved from _pending_handlers to the queue
  3. the update event comes in and is added to _pending_handlers (and since the remove event is no longer in _pending_handlers, the check for that lets it pass)

I didn't find a good workaround for this problem, and looking through the code it also looks like an add followed quickly but remove will drop the remove. As a workaround, is there a way to query if the service is still there?

@bdraco
Copy link
Member
bdraco commented Dec 17, 2023

Are you still seeing this behavior with 0.130.0?

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
0