1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 19:24:14 +08:00

mocknet: FullMesh connects to self too.

@maybebtc thoughts on this? dialing self should be
**possible**, so we should in general test that we do
consider that case, but not sure if this is good to expose
to clients. thoughts?

Btw, on why dialing self should be possible, we may create
little protocols which we may have a node connect to self,
say across its interfaces to test connectivity, etc...
think of it like:

> server localhost:1234 &
> curl localhost:1234
This commit is contained in:
Juan Batiz-Benet
2014-12-17 11:25:49 -08:00
parent b0a36aabcb
commit f354fa849e

View File

@ -53,10 +53,6 @@ func FullMeshConnected(ctx context.Context, n int) (Mocknet, error) {
nets := m.Nets()
for _, n1 := range nets {
for _, n2 := range nets {
if n1 == n2 {
continue
}
if err := m.ConnectNets(n1, n2); err != nil {
return nil, err
}