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

jstasiak / python-zeroconf / 709 / 4
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 26 May 2020 08:51PM UTC
Files 2
Run time 1s
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

26 May 2020 08:50PM UTC coverage: 92.721% (+0.009%) from 92.712%
709.4

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.

586 of 692 branches covered (84.68%)

2191 of 2363 relevant lines covered (92.72%)

0.93 hits per line

Source Files on job 709.4
  • Tree
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 551
  • Travis Job 709.4
  • fe865667 on github
  • Prev Job for on master (#694.1)
  • Next Job for on master (#710.1)
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