lib/karma/connection.rb in karma-0.1.4 vs lib/karma/connection.rb in karma-0.1.5

- old
+ new

@@ -1,9 +1,8 @@ module Karma class Connection def initialize - @maxlen = 4096 end def send_and_read(request) unless defined?(@socket) establish_connection! @@ -31,11 +30,11 @@ end end def read connect do |conn| - response = conn.recv(@maxlen) begin + response = conn.readline OpenStruct.new(JSON.parse(response)) rescue => e return OpenStruct.new({ "success" => false, "response" => e.message \ No newline at end of file