videlalvaro/php-amqplib — pull request #117 by znarf (2013-10-17 11:10:45+00:00)
Title: exit from while if fread return an empty string

in case of a read timeout, fread return an empty string and not false, we need to exit the while loop in this case

alternatively, we could read the 'timed_out' status from stream_get_meta_data like in the write method