Skip to content

Commit

Permalink
Merge pull request #5 from libp2p/fix/unspecific-dial-error
Browse files Browse the repository at this point in the history
dial: better error for uspecific relay dial failure
  • Loading branch information
vyzo authored Jul 25, 2017
2 parents 332879a + 88cc563 commit 4863c00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions p2p/protocol/internal/circuitv1-deprecated/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"fmt"
"math/rand"

pb "github.com/libp2p/go-libp2p-circuit/pb"

peer "github.com/libp2p/go-libp2p-peer"
pstore "github.com/libp2p/go-libp2p-peerstore"
tpt "github.com/libp2p/go-libp2p-transport"
Expand Down Expand Up @@ -94,7 +92,7 @@ func (d *RelayDialer) tryDialRelays(ctx context.Context, dinfo pstore.PeerInfo)
log.Debugf("error opening relay connection through %s: %s", dinfo.ID, err.Error())
}

return nil, RelayError{pb.CircuitRelay_HOP_NO_CONN_TO_DST}
return nil, fmt.Errorf("Failed to dial through %d known relay hosts", len(relays))
}

func (d *RelayDialer) Matches(a ma.Multiaddr) bool {
Expand Down

0 comments on commit 4863c00

Please sign in to comment.