Skip to content

Commit a0d26af

Browse files
committed
fix: hold a strong reference to the AsyncEngine setup task
1 parent ee1847d commit a0d26af

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/zeroconf/_engine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ async def _async_setup(self, loop_thread_ready: threading.Event | None) -> None:
9191
self._async_schedule_next_cache_cleanup()
9292
await self._async_create_endpoints()
9393
assert self.running_future is not None
94-
self.running_future.set_result(True)
94+
if not self.running_future.done():
95+
self.running_future.set_result(True)
9596
if loop_thread_ready:
9697
loop_thread_ready.set()
9798

0 commit comments

Comments
 (0)