stompgem / stomp

A ruby gem for sending and receiving messages from a Stomp protocol compliant message queue. Includes: failover logic, ssl support.
http://stomp.github.com
Apache License 2.0
152 stars 80 forks source link

Strip possible newline from beginning of frame #116

Closed psharpNumerex closed 8 years ago

psharpNumerex commented 8 years ago

We have seen a number of messages fail due to an errant \n at the beginning of the frame. This causes the frame command to be invalid, though the message is legitimate.

We believe there is a race condition occurring where AMQ is adding the additional \n after the \0 at the end of the previous frame, but that the is_ready? check at the end of a frame read is just missing it.