Skip to content

Commit

Permalink
FIX: Correct infinite loop detection
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaSayegh committed Jan 10, 2020
1 parent 4a81cfd commit 2c3f27d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logster/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ def apply_message_size_limit(limit, gems_dir: nil)
backtrace_limit = limit - (size - @backtrace.bytesize)
@backtrace.gsub!(gems_dir, "") if gems_dir
@backtrace.strip!
orig = @backtrace.dup
stop = false
while @backtrace.bytesize > backtrace_limit && backtrace_limit > 0 && !stop
orig = @backtrace.dup
lines = @backtrace.lines
if lines.size > 1
lines.pop
Expand Down

0 comments on commit 2c3f27d

Please sign in to comment.