Skip to content

Commit

Permalink
Revert "basichost: prevent duplicate dials (libp2p#2196)"
Browse files Browse the repository at this point in the history
This reverts commit 0d7e852.
  • Loading branch information
dennis-tra committed Jun 16, 2023
1 parent 703c3a4 commit 9e078c4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions p2p/host/basic/basic_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,8 @@ func (h *BasicHost) NewStream(ctx context.Context, p peer.ID, pids ...protocol.I
}
}

s, err := h.Network().NewStream(network.WithNoDial(ctx, "already dialed"), p)
s, err := h.Network().NewStream(ctx, p)
if err != nil {
// TODO: It would be nicer to get the actual error from the swarm,
// but this will require some more work.
if errors.Is(err, network.ErrNoConn) {
return nil, errors.New("connection failed")
}
return nil, err
}

Expand Down

0 comments on commit 9e078c4

Please sign in to comment.