diff --git a/Runtime/Model/Breadcrumbs/Storage/BacktraceStorageLogManager.cs b/Runtime/Model/Breadcrumbs/Storage/BacktraceStorageLogManager.cs index 10525bca..5df420c6 100644 --- a/Runtime/Model/Breadcrumbs/Storage/BacktraceStorageLogManager.cs +++ b/Runtime/Model/Breadcrumbs/Storage/BacktraceStorageLogManager.cs @@ -290,14 +290,12 @@ private long GetNextStartPosition() int nextLineBytes = NewRow.Length; while (numberOfFreeBytes < expectedFreedBytes) { - if (_logSize.TryDequeue(out long result)) - { - numberOfFreeBytes += (result + nextLineBytes); - } - else + if (_logSize.Count == 0) { return numberOfFreeBytes; } + + numberOfFreeBytes += (_logSize.Dequeue() + nextLineBytes); } return numberOfFreeBytes;