Fix IPubsub and add IPubsub.wait_until_ready

This commit is contained in:
mhchia
2020-01-27 00:10:33 +08:00
parent e3a1dd62e4
commit 92ea35e147
4 changed files with 76 additions and 32 deletions

View File

@ -245,8 +245,7 @@ class PubsubFactory(factory.Factory):
strict_signing=strict_signing,
)
async with background_trio_service(pubsub):
await pubsub.event_handle_peer_queue_started.wait()
await pubsub.event_handle_dead_peer_queue_started.wait()
await pubsub.wait_until_ready()
yield pubsub
@classmethod