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 authored and aarshkshah1992 committed Jan 12, 2021
1 parent 22c8a75 commit 24d7f19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sec/insecure/insecure.go
Expand Up @@ -108,6 +108,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 24d7f19

Please sign in to comment.