mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-13 10:43:59 +01:00
Fix zeroconf listener being removed from zeroconf callback (#538)
This commit is contained in:
parent
c457081c61
commit
ca254f150c
@ -279,6 +279,10 @@ class ReconnectLogic(zeroconf.RecordUpdateListener):
|
||||
self._log_name,
|
||||
record_update.new,
|
||||
)
|
||||
self._stop_zc_listen()
|
||||
# We can't stop the zeroconf listener here because we are in the middle of
|
||||
# a zeroconf callback which is iterating the listeners.
|
||||
#
|
||||
# So we schedule a stop for the next event loop iteration.
|
||||
self.loop.call_soon(self._stop_zc_listen)
|
||||
self._schedule_connect(0.0)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user