ApnsPHP
ApnsPHP copied to clipboard
fread would hang indefinitely when socket was empty, this prevents that.
Thank you, man! It fixed my broken cron which had been broken for weeks because of that issue.
Exact same thing happened to me, glad to help! After reading through the issues, it seems like it's a php bug (or behaviour change) introduced in some of the latest versions, where fread waits for the specified number of bytes to arrive in the socket and they never do, whereas before it wouldnt, and this is only a temporary fix and may even cause some side effects. Regardless, it fixed it in my use case and everything seems to be working
This seems to temporarily solve the problem, but any errors that would normally be bounced immediately are not reported. Instead they report as successfully sent.
THANK YOU!
Note that this issue should have been fixed with newer versions of PHP: see https://github.com/immobiliare/ApnsPHP/issues/84
@rwforsythe Yea, I know. But my application runs on GAE, which means I have no control over the PHP version. It could take months before Google upgrades from PHP 5.5.23
@JohnyDays I have got the same issue but adding the 4 lines of this commit didn't solve issue for me.
PHP Version is as follows: