diff --git a/platform/queue/queue.go b/platform/queue/queue.go index d83f9904..8d5e0b4b 100644 --- a/platform/queue/queue.go +++ b/platform/queue/queue.go @@ -83,11 +83,11 @@ func (db *Store) nextCommand(ctx context.Context, resp mdm.Response) (*Command, case "Acknowledged": // move to completed, send next x, a := cut(dc.Commands, resp.CommandUUID) - x.Acknowledged = time.Now().UTC() dc.Commands = a if x == nil { break } + x.Acknowledged = time.Now().UTC() dc.Completed = append(dc.Completed, *x) case "Error": // move to failed, send next