Fix nil pointer dereference

This commit is contained in:
Ingo Oppermann
2023-06-30 11:41:47 +02:00
parent d6a88cb0c5
commit c3b604cda2

View File

@@ -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
}