ruby-amqp/bunny — pull request #165 by meesern (2013-11-06 10:29:30+00:00)
Title: fixed 100% CPU problem under jruby

This change is to address a problem with Bunny locking up using 100% of a processor under jruby on ubuntu 12.04 i64 and ubuntu 10.04 arm after running for some hours.

The problem appears to be an operating system one where an EAGAIN exception is repeatedly raised on read_nonblock. Since the rescue and retry on retry exception classes exception handling exactly replicates the behaviour of the readpartial() method it seems reasonable to replace the misbehaving read_nonblock() with readpartial().

This fix is proving stable over time in the above long running systems.