New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NativeSocket's read() doesn't work with jobs larger than 8192 bytes #4
Comments
Thanks for the report. Cheers! |
This is a fix, sorry I've just notice this post -*-
|
Thanks for the bug report, Peter, and the code anusoft. Sorry it's taken me a while to get to it. I've actually found in PHP 5.2.10-2ubuntu6.4 nearly double 8192 is read on the first fread() when getting a job. I think this is probably because a prior call to fgets() buffers up to 8192 bytes and then only takes a short line from that buffer. Anyway - I've written a test which demonstrates the bug, and updated NativeSocket based on anusoft's code. I'd like to find time to write a nicer Pheanstalk_Socket implementation, perhaps using a select() loop. Fixed in 436e3bb. |
fread() only reads up to 8192 bytes, causing an exception to be thrown in Pheanstalk_Command->dispatchCommand() -- it's expecting a CRLF but there's remaining job data.
thanks for the client.
The text was updated successfully, but these errors were encountered: