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

Commit

Permalink
Messaging reconnect for release, this is currently a hack. (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazybuster authored and micahalcorn committed Aug 16, 2018
1 parent 882c746 commit 5bf4c5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ const ipfsCreator = repo_key => {
const ipfs = new IPFS(ipfsOptions)

if (process.env.IPFS_SWARM) {
const ipfs_swarm = process.env.IPFS_SWARM
ipfs.on("start", async ()=> {
await ipfs.swarm.connect(process.env.IPFS_SWARM)
await ipfs.swarm.connect(ipfs_swarm)
})
ipfs.__reconnect_peers = {}
ipfs.__reconnect_peers[process.env.IPFS_SWARM.split('/').pop()] = ipfs_swarm
}

return ipfs
Expand Down

0 comments on commit 5bf4c5c

Please sign in to comment.