immobiliare / ApnsPHP

ApnsPHP: Apple Push Notification & Feedback Provider
BSD 3-Clause "New" or "Revised" License
1.44k stars 452 forks source link

ApnsPHP_Feedback infinite cycle in !feof(...) #61

Closed sshilko closed 9 years ago

sshilko commented 10 years ago

code gets stuck at

while (!feof($this->_hSocket))

infinetly in ApnsPHP_Feedback receive().

duccio commented 9 years ago

We need more information about.

sshilko commented 9 years ago

http://php.net/manual/en/function.feof.php

I had this issue with live environment (not APNS sandbox), i run the feedback script with cronjob and once it got stuck

            $feedback = new ApnsPHP_Feedback($this->env, $this->pem);
            $feedback->connect();
            $deviceTokens = $feedback->receive();
            $feedback->disconnect();

And so it stuck inside receive() function writing

2014-09-02 13:10:37 - INFO: Reading...
2014-09-02 13:10:38 - INFO: Reading...
2014-09-02 13:10:39 - INFO: Reading...
2014-09-02 13:11:07 - INFO: Reading...

all get back when i have more details or a fix for this, i have an issue in internal tracker for this.