In Buffer->handleWrite() the result of fwrite is compared to false to check for errors.
In my case it returns 0 (and fills lastError with fwrite(): send of 49 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.).
The check for (0 === $sent && feof($this->stream)) fails as well because feof($this->stream) returns false.
Removing && feof($this->stream) fixes the problem.
I use the socket server and socket client. When I kill the server process and the client tries to write something, it loops forever with 100% cpu.
For further reference: http://php.net/manual/en/function.fwrite.php#96951
In
Buffer->handleWrite()the result of fwrite is compared to false to check for errors.In my case it returns 0 (and fills lastError with
fwrite(): send of 49 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.).The check for
(0 === $sent && feof($this->stream))fails as well becausefeof($this->stream)returns false.Removing
&& feof($this->stream)fixes the problem.I use the socket server and socket client. When I kill the server process and the client tries to write something, it loops forever with 100% cpu.
For further reference: http://php.net/manual/en/function.fwrite.php#96951