-
Notifications
You must be signed in to change notification settings - Fork 120
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
curl error when pusing to apns #175
Comments
It is hard to fix such error. Maybe the problem is on apple server side. |
unfortunatly, curl http code is 0, thus throwing this exception in Client.php line 161, and there is no valid response. |
maybe adding a retry function when curl get code 0 is a good idea. |
But then, since the whole sending crashes on one timeout, one would need to check which notifications where sent and re-try the sending with just the ones that were not sent, right? Which can't be done, since |
You can't just throw this exception, but handle it yourself instead. When curl http code got 0, you should add that notification to multi curl handler again to be sent later. |
No, the |
You can rewrite this method, and add retry mechanism. I just did this, and the error never affected my pushing project again lol. |
Sorry for the misinformation, after adding the retry mechanism ,this issue still bothers me, apns server will continue to deny this notification in next few minutes which means you need retry through this time span. I've figure out a solution, I recommand you use swoole http2 client and connection pool to maintain these connections. you can refer to https://wiki.swoole.com/zh-cn/#/coroutine_client/http2_client for more information. |
Sometimes, We got this error when pusing to apns: Operation timed out after 0 milliseconds with 0 out of 0 bytes received. The frequence is once or twice a day.
The text was updated successfully, but these errors were encountered: