Skip to content

Commit

Permalink
call finding peers only if drive length is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapaezbas committed Jan 24, 2025
1 parent 48529ef commit 40ea05f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subsystems/sidecar/lib/replicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ module.exports = class Replicator extends EventEmitter {
}

async _join (swarm, { announceSeeds, server, client }) {
const done = this.drive.findingPeers()
let done = () => {}
try {
await this.drive.ready()
if (this.drive.core.length === 0) done = this.drive.findingPeers()
} catch {
done()
return
Expand Down

0 comments on commit 40ea05f

Please sign in to comment.