Skip to content

Commit 8dba3c0

Browse files
committed
only guard add_item
1 parent 5a51e85 commit 8dba3c0

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

sentry-ruby/lib/sentry/telemetry_event_buffer.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ def initialize(configuration, client, event_class:, max_items:, max_items_before
3737
end
3838

3939
def flush
40-
return self if @mutex.owned?
41-
4240
@mutex.synchronize do
4341
return if empty?
4442

sentry-ruby/spec/support/shared_examples_for_telemetry_event_buffers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
3.times { subject.add_item(event) }
155155

156156
expect(items_sent).not_to be_empty
157+
expect(string_io.string).not_to include("deadlock")
157158
end
158159
end
159160

0 commit comments

Comments
 (0)