deepfryed / beanstalk-client

C/C++ beanstalk client
59 stars 44 forks source link

Fix reading error for job sizes around 490 bytes #9

Closed swehner closed 11 years ago

swehner commented 11 years ago

When the beanstalkd status is read into the initial buffer, the expected size doesn't take \r\n after job data into account. For jobs where status_size + job_data = 511 the \n will be left in the socket's buffer. This breaks the next command because the \n is not expected when the next beanstalk status is read.

deepfryed commented 11 years ago

derp. nice catch, thanks!