From bdfd3a30da732eb6a8bbe0b589b679f007af039a Mon Sep 17 00:00:00 2001 From: Facundo Date: Tue, 10 Dec 2024 19:47:35 +0100 Subject: [PATCH] fix: do not crash daemon with nil querymeta --- daemons/reporter/client/reporter_monitors.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/daemons/reporter/client/reporter_monitors.go b/daemons/reporter/client/reporter_monitors.go index 05bc798d4..628020108 100644 --- a/daemons/reporter/client/reporter_monitors.go +++ b/daemons/reporter/client/reporter_monitors.go @@ -21,7 +21,14 @@ func (c *Client) MonitorCyclelistQuery(ctx context.Context, wg *sync.WaitGroup) if err != nil { // log error c.logger.Error("getting current query", "error", err) + continue } + + if querymeta == nil { + c.logger.Error("QueryMeta is nil") + continue + } + mutex.RLock() committed := commitedIds[querymeta.Id] mutex.RUnlock()