Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
set the remote peer id in insecure transport when initialized without…
Browse files Browse the repository at this point in the history
… keys
  • Loading branch information
vyzo committed Sep 21, 2019
1 parent 92b3477 commit 3f9dbee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sec/insecure/insecure.go
Expand Up @@ -107,6 +107,11 @@ func (t *Transport) SecureOutbound(ctx context.Context, insecure net.Conn, p pee
p, conn.remote)
}

if t.key == nil && conn.remote == "" {
// set the remote peer id if we were initialiazed without keys
conn.remote = p
}

return conn, nil
}

Expand Down

0 comments on commit 3f9dbee

Please sign in to comment.