From 3707d489a6e4d6f8c6cf25ddceeeb0506b8e4572 Mon Sep 17 00:00:00 2001 From: Victor Vrantchan Date: Fri, 12 Oct 2018 09:16:52 -0400 Subject: [PATCH] read apns cert from db if stored --- platform/apns/service.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/apns/service.go b/platform/apns/service.go index 51347913..c84ac989 100644 --- a/platform/apns/service.go +++ b/platform/apns/service.go @@ -56,6 +56,12 @@ func New(db Store, provider PushCertificateProvider, sub pubsub.Subscriber, opts for _, opt := range opts { opt(&pushSvc) } + + pushsvc, _ := NewPushService(provider) + if pushsvc != nil { + pushSvc.pushsvc = pushsvc + } + // if there is no push service, the push certificate hasn't been provided. // start a goroutine that delays the run of this service. if err := updateClient(&pushSvc, sub); err != nil {