lib/sensu/client/socket.rb
def reset_watchdog
        cancel_watchdog
        @watchdog = EM::Timer.new(WATCHDOG_DELAY) do
          @mode = MODE_REJECT
          @logger.warn("discarding data buffer for sender and closing connection", {
            :data => @data_buffer,
            :parse_error => @parse_error
          })
          respond("invalid")
        end
      end
# Reset (or start) the connection watchdog.
Reset (or start) the connection watchdog.
Reset ( or start ) the connection watchdog .
def reset_watchdog
        cancel_watchdog
        @watchdog = EM::Timer.new(WATCHDOG_DELAY) do
          @mode = MODE_REJECT
          @logger.warn("discarding data buffer for sender and closing connection", {
            :data => @data_buffer,
            :parse_error => @parse_error
          })
          respond("invalid")
        end
      end
def reset_watchdog cancel_watchdog @watchdog = EM :: Timer . new ( WATCHDOG_DELAY ) do @mode = MODE_REJECT @logger . warn ( "discarding data buffer for sender and closing connection" , { :data => @data_buffer , :parse_error => @parse_error } ) respond ( "invalid" ) end end
Reset (or start) the connection watchdog.
Reset ( or start ) the connection watchdog .