Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCM adapter: get response only for last chunk of pushes #87

Open
harrisred opened this issue Nov 4, 2015 · 0 comments
Open

GCM adapter: get response only for last chunk of pushes #87

harrisred opened this issue Nov 4, 2015 · 0 comments

Comments

@harrisred
Copy link

In GCM adapter, in the push function you chunk the tokens per 100. When you iterate over the chunks, you store the response of the client->send() in $this->response, but if someone sends more than 100 tokens you override the response with the new response you receive from the send()!

If for example I send a message to 110 tokens, you will send the first 100 and store the response, but in the next iteration (next 10 tokens) you will override the previous response with the last 10.

Also you should consider changing the chunk value to 1000 (as this the maximum number of allowed tokens in GCM multicast), to improve the performance. Or even better this value should be passed as an optional argument in the push() function of the push manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants