def read_packet
      begin
        with_timeout do
          lines = []
          while(str = @socket.readline.to_s) do
            break if str.strip == '.'
            lines << str.strip
          end
          parse_error(lines)
          lines
        end
      rescue Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, EOFError => ex
        raise Munin::ConnectionError, ex.message
      rescue Timeout::Error
        raise Munin::ConnectionError, "Timed out reading from #{@host}."
      end
    end
def read_packet
      begin
        with_timeout do
          lines = []
          while(str = @socket.readline.to_s) do
            break if str.strip == '.'
            lines << str.strip
          end
          parse_error(lines)
          lines
        end
      rescue Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, EOFError => ex
        raise Munin::ConnectionError, ex.message
      rescue Timeout::Error
        raise Munin::ConnectionError, "Timed out reading from #{@host}."
      end
    end
Reads a packet of data until '.' reached