Merge pull request #433 from crazybuster/await-on-send
Wait for send to complete on exchange heads
This commit is contained in:
commit
eafc95805f
@ -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