Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/SymbolCollector.Server/SymbolService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ internal class InMemorySymbolService : ISymbolService, IDisposable
private readonly IBatchFinalizer _batchFinalizer;
private readonly SymbolServiceOptions _options;
private readonly ILogger<InMemorySymbolService> _logger;
private readonly Random _random = new Random();

private readonly ConcurrentDictionary<Guid, SymbolUploadBatch> _batches = new();

Expand Down Expand Up @@ -142,7 +141,7 @@ public async Task<StoreResult> Store(Guid batchId, string fileName, Stream strea
batch.BatchType.ToSymsorterPrefix(),
batchId.ToString(),
// To avoid files with conflicting name from the same batch
_random.Next().ToString(CultureInfo.InvariantCulture),
Random.Shared.Next().ToString(CultureInfo.InvariantCulture),
fileName);

var tempDestination = Path.Combine(Path.GetTempPath(), destination);
Expand Down Expand Up @@ -201,7 +200,7 @@ private async Task<StoreResult> StoreIsolated(

conflictDestination = Path.Combine(conflictDestination, batchId.ToString(),
// To avoid files with conflicting name from the same batch
_random.Next().ToString(CultureInfo.InvariantCulture),
Random.Shared.Next().ToString(CultureInfo.InvariantCulture),
fileName);

using (_logger.BeginScope(new Dictionary<string, string>()
Expand Down
Loading