Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 5bf4c5c

Browse files
crazybustermicahalcorn
authored andcommitted
Messaging reconnect for release, this is currently a hack. (#413)
1 parent 882c746 commit 5bf4c5c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/services/origin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ const ipfsCreator = repo_key => {
5151
const ipfs = new IPFS(ipfsOptions)
5252

5353
if (process.env.IPFS_SWARM) {
54+
const ipfs_swarm = process.env.IPFS_SWARM
5455
ipfs.on("start", async ()=> {
55-
await ipfs.swarm.connect(process.env.IPFS_SWARM)
56+
await ipfs.swarm.connect(ipfs_swarm)
5657
})
58+
ipfs.__reconnect_peers = {}
59+
ipfs.__reconnect_peers[process.env.IPFS_SWARM.split('/').pop()] = ipfs_swarm
5760
}
5861

5962
return ipfs

0 commit comments

Comments
 (0)