forked from LBRYCommunity/lbry-sdk
start() should not return until ledger has finished starting, which means self.join_network() needs to be yielded on the first connection
This commit is contained in:
parent
d02da2f3a5
commit
2723a55766
1 changed files with 2 additions and 1 deletions
|
@ -220,9 +220,10 @@ class BaseLedger(metaclass=LedgerRegistry):
|
|||
self.headers.open()
|
||||
])
|
||||
first_connection = self.network.on_connected.first
|
||||
self.network.on_connected.listen(self.join_network)
|
||||
self.network.start()
|
||||
yield first_connection
|
||||
yield self.join_network()
|
||||
self.network.on_connected.listen(self.join_network)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def join_network(self, *args):
|
||||
|
|
Loading…
Reference in a new issue