mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-11 20:45:32 +08:00
use context.TODO instead of nil context (#169)
according to the library docs, a nil context should never be passed context.TODO() returns an empty context value instead: https://golang.org/pkg/context/
This commit is contained in:
@@ -40,10 +40,12 @@ func (svc *Push) startQueuedSubscriber(push *push.Service, sub pubsub.Subscriber
|
||||
cq, err := queue.UnmarshalQueuedCommand(event.Message)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
continue
|
||||
}
|
||||
_, err = svc.Push(nil, cq.DeviceUDID)
|
||||
_, err = svc.Push(context.TODO(), cq.DeviceUDID)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user