Skip to content

resolve issue #56: service browser initialization race#57

Merged
stephenrauch merged 1 commit into
python-zeroconf:masterfrom
herczy:master
Jun 26, 2016
Merged

resolve issue #56: service browser initialization race#57
stephenrauch merged 1 commit into
python-zeroconf:masterfrom
herczy:master

Conversation

@herczy
Copy link
Copy Markdown

@herczy herczy commented May 30, 2016

No description provided.

@coveralls
Copy link
Copy Markdown

coveralls commented May 30, 2016

Coverage Status

Coverage remained the same at 76.613% when pulling 1567016 on herczy:master into f33b8f9 on jstasiak:master.

Comment thread zeroconf.py

self.done = False

self.zc.add_listener(self, DNSQuestion(self.type, _TYPE_PTR, _CLASS_IN))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A likely better change to address this is to instead move the offending:

self.zc.add_listener(self, DNSQuestion(self.type, _TYPE_PTR, _CLASS_IN))

To the first line in the ServiceBrowser.run() method. This would eliminate all race conditions as the ServiceBrowser() would be fully instantiated before opening for business..

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.

3 participants