Conversation
|
@yufewell, could you have any test to prove this change? |
yes, cut off wi-fi then readBytes will be endless loop, |
Taluu
left a comment
There was a problem hiding this comment.
Not sure why we would break out of a loop to stop reading but okay. The reading mechanism is flawed anyways...
|
Co-Authored-By: Baptiste Clavié <[email protected]>
Co-Authored-By: Baptiste Clavié <[email protected]>
also can use keepAlive function to reconnect... |
Taluu
left a comment
There was a problem hiding this comment.
To be honest, not sure if I'm truly convinced this patch is needed.
But I can be wrong...
| if ($i > 2) { | ||
| throw new ServerConnectionFailureException('fread times error'); | ||
| } |
There was a problem hiding this comment.
This seems pretty arbitrary that after 2 iterations, we would make it die.
There was a problem hiding this comment.
i did not find correct way to solve endless loop problem.
when fread always return empty string, cpu will went high and loop will not break off.
i tried some ways, timed_out, is_resource... but did not work...
There was a problem hiding this comment.
What could be done would be to temper with pcntl signals to stop the loop then. WDYT ?
You, wrong ? Nah !!!! |
fix readBytes endless loop