From c3b604cda21d176da9e57fca85fe3534d46db171 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Fri, 30 Jun 2023 11:41:47 +0200 Subject: [PATCH] Fix nil pointer dereference --- cluster/node.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster/node.go b/cluster/node.go index bb3a81a4..04fdb2b8 100644 --- a/cluster/node.go +++ b/cluster/node.go @@ -72,9 +72,6 @@ func (n *clusterNode) start(id string) error { ctx, cancel := context.WithCancel(context.Background()) n.cancelPing = cancel - go n.ping(ctx) - go n.pingCore(ctx) - n.lastCoreContactErr = fmt.Errorf("not started yet") n.lastContactErr = fmt.Errorf("not started yet") @@ -110,6 +107,9 @@ func (n *clusterNode) start(id string) error { }(ctx) } + go n.ping(ctx) + go n.pingCore(ctx) + return nil }