lib/fastdfs-client/socket.rb in fastdfs-client-1.2.0 vs lib/fastdfs-client/socket.rb in fastdfs-client-1.3.0

- old
+ new

@@ -17,12 +17,14 @@ @recv_timeout = @options[:recv_timeout] || 20 connection end def write(*args) + debugger if args[1] == 119 @cmd = args.shift pkg = args.shift + pkg = pkg.pack("C*") if pkg.is_a?(Array) @socket.write pkg end def close @@ -87,10 +89,10 @@ len = [body_len, max_len].min @content << @socket.recv(len) body_len -= len end end - @content = nil if Utils.is_blank? @content + @content = nil if @content.blank? end end end end \ No newline at end of file