From 81f2c711b484d05fbbab2394dd8860700294cbf2 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 15 Jan 2024 23:14:43 +0000 Subject: [PATCH] Fix panic in `getPeers` on abstract UNIX socket names Fixes #1111 --- cmd/yggdrasilctl/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/yggdrasilctl/main.go b/cmd/yggdrasilctl/main.go index 8f99e0d..db82341 100644 --- a/cmd/yggdrasilctl/main.go +++ b/cmd/yggdrasilctl/main.go @@ -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,