mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-07 10:05:48 +08:00
set ack time only if command is not nil
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user