Only initial MaxConcurrentIOSPushes once. (#591)

This commit is contained in:
Bo-Yi Wu
2021-07-16 16:30:01 +08:00
committed by GitHub
parent ab8b1991ab
commit 73ff554b19
13 changed files with 106 additions and 107 deletions

View File

@@ -56,6 +56,7 @@ func (s *Server) Check(ctx context.Context, in *proto.HealthCheckRequest) (*prot
func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*proto.NotificationReply, error) {
badge := int(in.Badge)
notification := gorush.PushNotification{
Cfg: s.cfg,
Platform: int(in.Platform),
Tokens: in.Tokens,
Message: in.Message,
@@ -101,7 +102,7 @@ func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*prot
}
}
go gorush.SendNotification(s.cfg, notification)
go gorush.SendNotification(notification)
return &proto.NotificationReply{
Success: true,