Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Feb 16, 2024
1 parent d54d815 commit 3e91f3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/datadog/core/remote/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def wait_once(timeout = nil)
deadline = [
timeout ? now + timeout : nil,
@deadline,
].compact.sort.first
].compact.min

timeout = deadline ? deadline - now : nil
# workaround for rubocop & steep trying to mangle the code
Expand All @@ -162,11 +162,11 @@ def wait_once(timeout = nil)
# - before Ruby 3.2, ConditionVariable returns itself
# so we have to rely on @lifted having been set
lifted = if RUBY_VERSION >= '3.2'
!!@condition.wait(@mutex, timeout)
else
@condition.wait(@mutex, timeout)
@lifted
end
!!@condition.wait(@mutex, timeout)
else
@condition.wait(@mutex, timeout)
@lifted
end

if lifted
:lift
Expand Down

0 comments on commit 3e91f3b

Please sign in to comment.