lib/relay/protocol: Merge two Sprintf calls

This commit is contained in:
greatroar 2021-09-05 17:20:52 +02:00 committed by Jakob Borg
parent eafb40460d
commit 13196ddd92

View File

@ -60,13 +60,9 @@ func (i SessionInvitation) String() string {
if address, err := syncthingprotocol.DeviceIDFromBytes(i.From); err == nil {
device = address.String()
}
return fmt.Sprintf("%s@%s", device, i.AddressString())
return fmt.Sprintf("%s@%s:%d", device, net.IP(i.Address), i.Port)
}
func (i SessionInvitation) GoString() string {
return i.String()
}
func (i SessionInvitation) AddressString() string {
return fmt.Sprintf("%s:%d", net.IP(i.Address), i.Port)
}