Commit 6291c254 authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(net/conn) Set peer to "Remote" in Dial method

@jbenet we may want to consider setting the default type to Remote. I
left the default as Unspecified just for safety.

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 0f6a2e27
......@@ -23,6 +23,7 @@ func (d *Dialer) Dial(ctx context.Context, network string, remote peer.Peer) (Co
return nil, fmt.Errorf("No remote address for network %s", network)
}
remote.SetType(peer.Remote)
remote, err := d.Peerstore.Add(remote)
if err != nil {
log.Errorf("Error putting peer into peerstore: %s", remote)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment