When consuming a slowly transmitted stream, such as an LLM response over HTTP, the stream occasionally closes prematurely.
This issue likely stems from a change made in pull request #139. Specifically, commenting out the entire elseif block, which includes the condition
elseif (\feof($this->stream)) {
resolves the problem. I believe replacing this block with a timeout mechanism would be a more robust solution.
When consuming a slowly transmitted stream, such as an LLM response over HTTP, the stream occasionally closes prematurely.
This issue likely stems from a change made in pull request #139. Specifically, commenting out the entire elseif block, which includes the condition
resolves the problem. I believe replacing this block with a timeout mechanism would be a more robust solution.