mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Wait for the message to be actually sent before continuing
This commit is contained in:
parent
11d7c32d1a
commit
003c658927
@ -36,7 +36,7 @@ const exchangeHeads = async (ipfs, address, peer, getStore, getDirectConnection,
|
||||
const heads = getHeadsForDatabase(getStore(address))
|
||||
logger.debug(`Send latest heads of '${address}':\n`, JSON.stringify(heads.map(e => e.hash), null, 2))
|
||||
if (heads) {
|
||||
channel.send(JSON.stringify({ address: address, heads: heads }))
|
||||
await channel.send(JSON.stringify({ address: address, heads: heads }))
|
||||
}
|
||||
|
||||
return channel
|
||||
|
Loading…
x
Reference in New Issue
Block a user