Skip to content

Commit

Permalink
fix immediately throw away processor
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso committed Apr 27, 2023
1 parent 0b45c70 commit 0733776
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/datadog/appsec/contrib/rack/request_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ def initialize(app, opt = {})
@oneshot_tags_sent = false
end

# rubocop:disable Metrics/AbcSize,Metrics/PerceivedComplexity,Metrics/CyclomaticComplexity,Metrics/MethodLength
# rubocop:disable Metrics/PerceivedComplexity,Metrics/CyclomaticComplexity,Metrics/MethodLength
def call(env)
return @app.call(env) unless Datadog::AppSec.enabled?

Datadog::Core::Remote.active_remote.barrier(:once) unless Datadog::Core::Remote.active_remote.nil?
processor = Datadog::AppSec.processor

processor = nil
ready = false
Expand Down Expand Up @@ -89,7 +88,7 @@ def call(env)
processor.deactivate_context
end
end
# rubocop:enable Metrics/AbcSize,Metrics/PerceivedComplexity,Metrics/CyclomaticComplexity,Metrics/MethodLength
# rubocop:enable Metrics/PerceivedComplexity,Metrics/CyclomaticComplexity,Metrics/MethodLength

private

Expand Down

0 comments on commit 0733776

Please sign in to comment.