class HTTP::Timeout::Global

def readpartial(size)

Read from the socket
def readpartial(size)
  reset_timer
  begin
    socket.read_nonblock(size)
  rescue IO::WaitReadable
    IO.select([socket], nil, nil, time_left)
    log_time
    retry
  end
end