mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-14 13:16:54 +00:00
ensure_contacts now wait for contacts to be there before continuing.
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "2.1.10"
|
version = "2.1.11"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||||
|
|||||||
@@ -464,5 +464,6 @@ class MeshCore:
|
|||||||
"""Ensure contacts are fetched"""
|
"""Ensure contacts are fetched"""
|
||||||
if not self._contacts or (follow and self._contacts_dirty):
|
if not self._contacts or (follow and self._contacts_dirty):
|
||||||
await self.commands.get_contacts(lastmod=self._lastmod)
|
await self.commands.get_contacts(lastmod=self._lastmod)
|
||||||
|
await self.wait_for_event(EventType.CONTACTS, timeout=30) # contact list can be huge
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user