def timer_on (opts={})
    @timer.cancel unless @timer.nil?
    length = @timeout + (opts[:with_interval] ? @interval : 0)
    @timer = EventMachine::Timer.new(length) {
      scrap = @buf ? " - #{@buf.flush}" : ''
      @handler.logger.error "timeout on #{@handler.name}" + scrap
      @handler.logger.debug {"pid #{get_pid}"}
      close_connection()
    }
  end
def timer_on (opts={})
    @timer.cancel unless @timer.nil?
    length = @timeout + (opts[:with_interval] ? @interval : 0)
    @timer = EventMachine::Timer.new(length) {
      scrap = @buf ? " - #{@buf.flush}" : ''
      @handler.logger.error "timeout on #{@handler.name}" + scrap
      @handler.logger.debug {"pid #{get_pid}"}
      close_connection()
    }
  end
reset / start timeout timer