From 42f84c4e19c36d3d539a09ba528aeb204973898d Mon Sep 17 00:00:00 2001 From: Jesse Peterson Date: Fri, 12 Apr 2024 19:28:15 -0700 Subject: [PATCH] fix crash with nil check for in-memory queue for NotNow. resolves #983. (#984) --- platform/queue/inmem/inmem.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/queue/inmem/inmem.go b/platform/queue/inmem/inmem.go index 31c57c86..090deb2a 100644 --- a/platform/queue/inmem/inmem.go +++ b/platform/queue/inmem/inmem.go @@ -91,7 +91,9 @@ func (q *QueueInMem) Next(_ context.Context, resp mdm.Response) ([]byte, error) switch resp.Status { case "NotNow": qCmd, _ := q.findCommandByUUID(l, resp.CommandUUID) - qCmd.notNow = true + if qCmd != nil { + qCmd.notNow = true + } case "Acknowledged", "Error", "CommandFormatError": _, e := q.findCommandByUUID(l, resp.CommandUUID) if e != nil {