5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-22 12:55:39 +00:00

Fix panic in getPeers on abstract UNIX socket names

Fixes #1111
This commit is contained in:
Neil Alexander 2024-01-15 23:14:43 +00:00
parent 180d7bf499
commit 81f2c711b4
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -183,13 +183,13 @@ func run() int {
if peer.Inbound {
dir = "In"
}
uri, err := url.Parse(peer.URI)
if err != nil {
panic(err)
uristring := peer.URI
if uri, err := url.Parse(peer.URI); err == nil {
uri.RawQuery = ""
uristring = uri.String()
}
uri.RawQuery = ""
table.Append([]string{
uri.String(),
uristring,
state,
dir,
peer.IPAddress,