app/controllers/extface/handler_controller.rb in extface-0.5.0 vs app/controllers/extface/handler_controller.rb in extface-0.5.1

- old
+ new

@@ -32,12 +32,13 @@ else Extface.redis_block do |r| r.append device.uuid, request.body.read @full_buffer = r.get device.uuid end - if bytes_porcessed = device.driver.pre_handle(@full_buffer.b) + while @full_buffer.present? && bytes_porcessed = device.driver.pre_handle(@full_buffer.b) #handle more than one valid packet in the buffer Extface.redis_block do |r| r.set device.uuid, @full_buffer.b[bytes_porcessed..-1] + @full_buffer = r.get device.uuid end end #stream_job # stream right now :) status = :ok end