From 9b39c885fd6970b109e99724820a35f6ef25448e Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 25 Jun 2024 18:51:15 +0200 Subject: [PATCH] Do not use unsupported API --- .../Breadcrumbs/Storage/BacktraceStorageLogManager.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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;