more debugging
This commit is contained in:
parent
c69fbb7f67
commit
bdec973ff4
|
@ -200,14 +200,15 @@ module XGen
|
||||||
|
|
||||||
def object_from_stream
|
def object_from_stream
|
||||||
buf = ByteBuffer.new
|
buf = ByteBuffer.new
|
||||||
buf.put_array(@db.socket.recv(4).unpack("C*"))
|
read = @db.socket.recv(4)
|
||||||
|
buf.put_array(read.unpack("C*"))
|
||||||
buf.rewind
|
buf.rewind
|
||||||
size = buf.get_int
|
size = buf.get_int
|
||||||
# TODO debugging here for a bit
|
# TODO debugging here for a bit
|
||||||
begin
|
begin
|
||||||
buf.put_array(@db.socket.recv(size-4).unpack("C*"), 4)
|
buf.put_array(@db.socket.recv(size-4).unpack("C*"), 4)
|
||||||
rescue => ex
|
rescue => ex
|
||||||
raise "#{ex.class}: #{ex.message} ***size was #{size}*res_flags #{@result_flags}*cursor_id #{@cursor_id}*starting_from #{@starting_from}*n_returned #{@n_returned}***"
|
raise "#{ex.class}: #{ex.message} ***size was #{size}*size string was #{read.inspect}*res_flags #{@result_flags}*cursor_id #{@cursor_id}*starting_from #{@starting_from}*n_returned #{@n_returned}***"
|
||||||
end
|
end
|
||||||
@n_remaining -= 1
|
@n_remaining -= 1
|
||||||
buf.rewind
|
buf.rewind
|
||||||
|
|
Loading…
Reference in New Issue