fix crash with nil check for in-memory queue for NotNow. resolves #983. (#984)

This commit is contained in:
Jesse Peterson
2024-04-12 19:28:15 -07:00
committed by GitHub
parent 1656853d57
commit 42f84c4e19

View File

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