diff --git a/lib/datadog/core/remote/component.rb b/lib/datadog/core/remote/component.rb index 18e33bea250..f73d9742b65 100644 --- a/lib/datadog/core/remote/component.rb +++ b/lib/datadog/core/remote/component.rb @@ -137,11 +137,13 @@ def wait_once(timeout = nil) def lift @mutex.lock - @once ||= true + begin + @once ||= true - @condition.broadcast - ensure - @mutex.unlock + @condition.broadcast + ensure + @mutex.unlock + end end end