Error in ResourceOutputStream, fwrite
opened this issue · comments
After last commit, I get strange errors:
Amp\ByteStream\StreamException: Failed to write to socket Errno: 2; stream_socket_accept(): accept failed: Connection timed out
and
Amp\ByteStream\StreamException: Failed to write to socket Errno: 2; inet_pton(): Unrecognized address 127.0.0.1:11001
after some research i find that problems are from this:
https://github.com/amphp/byte-stream/blob/master/lib/ResourceOutputStream.php#L71
if I call it without $chunkSize
all is ok!
is this problem from PHP ?
I am using this:
PHP 7.1.3 (cli) (built: Mar 17 2017 13:43:06) ( NTS )
Only I get this bug ?
Can someone confirm this ?
UPDATE: find problem, preparing pull request
Sorry for few details. Here I use this: https://github.com/umbri/Empower/blob/master/src/Connection.php#L129