Skip to content

Commit

Permalink
early out on connect to self
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Oct 6, 2015
1 parent 40b7f32 commit 704b0dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ func IpfsShell(n int) error {
}

func ConnectNodes(from, to int) error {
if from == to {
// skip connecting to self..
return nil
}
fmt.Printf("connecting %d -> %d\n", from, to)
cmd := exec.Command("ipfs", "id", "-f", "<addrs>")
cmd.Env = []string{"IPFS_PATH=" + IpfsDirN(to)}
Expand Down

0 comments on commit 704b0dc

Please sign in to comment.