lib/amqp/queue.rb in famoseagle-carrot-0.6.0 vs lib/amqp/queue.rb in famoseagle-carrot-0.7.0
- old
+ new
@@ -22,11 +22,14 @@
return unless method.is_a?(Protocol::Basic::GetOk)
self.delivery_tag = method.delivery_tag
header = server.next_payload
- msg = server.next_payload
- raise 'unexpected length' if msg.length < header.size
+
+ msg = ''
+ while msg.length < header.size
+ msg << server.next_payload
+ end
msg
end
def ack