fix: set the username to the peer id for all connection uris
This commit is contained in:
parent
5fcf99d97e
commit
701386c05d
|
@ -116,14 +116,18 @@ func (h HandshakeDone) HandleMessage(message IncomingMessageDataSigned) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
peer.SetConnectionURIs(h.connectionUris)
|
||||
|
||||
peerId, err := peer.Id().ToString()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, uri := range h.connectionUris {
|
||||
uri.User = url.User(peerId)
|
||||
}
|
||||
|
||||
peer.SetConnectionURIs(h.connectionUris)
|
||||
|
||||
logger.Info(fmt.Sprintf("[+] %s (%s)", peerId, peer.RenderLocationURI()))
|
||||
|
||||
err = mediator.ConnectToNode([]*url.URL{h.connectionUris[0]}, false, peer)
|
||||
|
|
Loading…
Reference in New Issue