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:
Victor Vrantchan
2017-05-26 18:13:01 -04:00
committed by GitHub
parent 8b36409f20
commit 40ea5ab0ee

View File

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