From 13931817dd1a476aeb19e2a3af4a5c1f5f06d41f Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Wed, 23 Aug 2023 11:22:32 +0200 Subject: [PATCH] fix: a crash when the user provides a connection string there is no running server for is fixed --- server/pairing/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/pairing/client.go b/server/pairing/client.go index c583cc674..df345a637 100644 --- a/server/pairing/client.go +++ b/server/pairing/client.go @@ -55,7 +55,11 @@ func NewBaseClient(c *ConnectionParams) (*BaseClient, error) { serverCert, err = getServerCert(u) if err != nil { - certErrs = fmt.Errorf("%sconnecting to '%s' failed: %s; ", certErrs.Error(), u, err.Error()) + var certErr string + if certErrs != nil { + certErr = certErrs.Error() + } + certErrs = fmt.Errorf("%sconnecting to '%s' failed: %s; ", certErr, u, err.Error()) continue }