mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-06-24 23:12:29 +00:00
fix: Time out put operations.
This commit is contained in:
parent
37abd1a0b4
commit
5282fb2d77
@ -38,7 +38,7 @@ const IPFSBlockStorage = async ({ ipfs, pin, timeout } = {}) => {
|
||||
*/
|
||||
const put = async (hash, data) => {
|
||||
const cid = CID.parse(hash, base58btc)
|
||||
await ipfs.blockstore.put(cid, data)
|
||||
await ipfs.blockstore.put(cid, data, { signal: AbortSignal.timeout(timeout) })
|
||||
|
||||
if (pin && !(await ipfs.pins.isPinned(cid))) {
|
||||
await ipfs.pins.add(cid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user