Skip to content

Commit

Permalink
Fix panic in getPeers on abstract UNIX socket names
Browse files Browse the repository at this point in the history
Fixes #1111
  • Loading branch information
neilalexander committed Jan 15, 2024
1 parent 180d7bf commit 81f2c71
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/yggdrasilctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 81f2c71

Please sign in to comment.