Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
sdk/python: take every answer in a loop, not through any()
Antonio Ojea2cdab80cffeb
diff --git a/sdk/python/src/agent_mesh/discovery.py b/sdk/python/src/agent_mesh/discovery.pyindex 08180364..6c0cbea0 100644--- a/sdk/python/src/agent_mesh/discovery.py+++ b/sdk/python/src/agent_mesh/discovery.py@@ -172,7 +172,10 @@ async def _walk(host: IHost, req: kad.Message, seeds: Iterable[ID], take: Callabfor peer_id in batch:nursery.start_soon(ask, peer_id)# Every answer is taken: the providers each router knows add up.- if any([take(resp) for resp in answers]):+ satisfied = False+ for resp in answers:+ satisfied = take(resp) or satisfied+ if satisfied:returncloser: dict[ID, PeerInfo] = {}