• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jstasiak / python-zeroconf / 709
94%

Build:
DEFAULT BRANCH: master
Ran 26 May 2020 08:51PM UTC
Jobs 6
Files 2
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
709

push

travis-ci

web-flow
Don't call callbacks when holding _handlers_lock (#258)

Closes #255

Background:
#239 adds the lock _handlers_lock:

python-zeroconf/zeroconf/__init__.py

    self._handlers_lock = threading.Lock()  # ensure we process a full message in one go 

Which is used in the engine thread:

     def handle_response(self, msg: DNSIncoming) -> None: 
         """Deal with incoming response packets.  All answers 
         are held in the cache, and listeners are notified.""" 
  
         with self._handlers_lock: 
  

And also by the service browser when issuing the state change callbacks:

 if len(self._handlers_to_call) > 0 and not self.zc.done: 
     with self.zc._handlers_lock: 
         handler = self._handlers_to_call.popitem(False) 
         self._service_state_changed.fire( 
             zeroconf=self.zc, service_type=self.type, name=handler[0], state_change=handler[1] 
         ) 

Both pychromecast and Home Assistant calls Zeroconf.get_service_info from the service callbacks which means the lock may be held for several seconds which will starve the engine thread.

554 of 661 branches covered (83.81%)

2184 of 2356 relevant lines covered (92.7%)

5.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 709.1 26 May 2020 08:52PM UTC 0
92.71
Travis Job 709.1
2 709.2 26 May 2020 08:51PM UTC 0
92.63
Travis Job 709.2
3 709.3 26 May 2020 08:51PM UTC 0
92.71
Travis Job 709.3
4 709.4 26 May 2020 08:51PM UTC 0
92.72
Travis Job 709.4
5 709.5 26 May 2020 08:52PM UTC 0
92.71
Travis Job 709.5
6 709.6 26 May 2020 08:54PM UTC 0
92.75
Travis Job 709.6
Source Files on build 709
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #709
  • fe865667 on github
  • Prev Build on master (#694)
  • Next Build on master (#710)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc