class Redis::Connection::Hiredis

def read

def read
  reply = @connection.read
  reply = CommandError.new(reply.message) if reply.is_a?(RuntimeError)
  reply
rescue Errno::EAGAIN
  raise TimeoutError
rescue RuntimeError => err
  raise ProtocolError.new(err.message)
end