From e94e81473c302489cc5354d599324b538350ca4d Mon Sep 17 00:00:00 2001 From: ersonp Date: Wed, 15 Sep 2021 18:39:07 +0530 Subject: [PATCH 1/3] Fix nil pointer dereference --- pkg/setup/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/setup/node.go b/pkg/setup/node.go index 2453a75d5c..7c6e34add7 100644 --- a/pkg/setup/node.go +++ b/pkg/setup/node.go @@ -170,11 +170,11 @@ func ReserveRouteIDs(ctx context.Context, log logrus.FieldLogger, dialer network if err != nil { return nil, fmt.Errorf("failed to instantiate route id reserver: %w", err) } - defer func() { + defer func(idR IDReserver) { if err != nil { log.WithError(idR.Close()).Warn("Closing router clients due to error.") } - }() + }(idR) if err = idR.ReserveIDs(ctx); err != nil { return nil, fmt.Errorf("failed to reserve route ids: %w", err) From 2845ec41741bc1344e07985d3fd67cf3c07912ca Mon Sep 17 00:00:00 2001 From: ersonp Date: Fri, 17 Sep 2021 13:54:13 +0530 Subject: [PATCH 2/3] Update fix --- pkg/setup/node.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/setup/node.go b/pkg/setup/node.go index 7c6e34add7..95fee89638 100644 --- a/pkg/setup/node.go +++ b/pkg/setup/node.go @@ -170,14 +170,14 @@ func ReserveRouteIDs(ctx context.Context, log logrus.FieldLogger, dialer network if err != nil { return nil, fmt.Errorf("failed to instantiate route id reserver: %w", err) } - defer func(idR IDReserver) { + defer func() { if err != nil { log.WithError(idR.Close()).Warn("Closing router clients due to error.") } - }(idR) + }() if err = idR.ReserveIDs(ctx); err != nil { - return nil, fmt.Errorf("failed to reserve route ids: %w", err) + return idR, fmt.Errorf("failed to reserve route ids: %w", err) } return idR, nil } From d22f3d2676ce24cd954a0a404224ed9dcf22b3fe Mon Sep 17 00:00:00 2001 From: ersonp Date: Fri, 17 Sep 2021 14:17:18 +0530 Subject: [PATCH 3/3] Appveyor changes --- .appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 218e9b3ff7..f7ac6da56d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ version: "{build}" -stack: node 10.16.3 +stack: node 16.8.0 environment: matrix: @@ -11,9 +11,9 @@ environment: - job_name: MacOS appveyor_build_worker_image: macos GOARCH: amd64 - - job_name: Windows - appveyor_build_worker_image: Visual Studio 2019 - GOARCH: amd64 + # - job_name: Windows + # appveyor_build_worker_image: Visual Studio 2019 + # GOARCH: amd64 # For release, by pushing tag - job_name: linux-amd64