Skip to content

Commit

Permalink
Avoid exception with duplicate irrecoverable failure
Browse files Browse the repository at this point in the history
  • Loading branch information
m3taphysics committed Jan 28, 2025
1 parent 0aa252c commit 844f347
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using ECS.StreamableLoading.Cache.InMemory;
using ECS.StreamableLoading.Common.Components;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using Utility;
Expand Down Expand Up @@ -343,7 +344,7 @@ void TryRemoveOngoingRequest()

private StreamableLoadingResult<TAsset> SetIrrecoverableFailure(TIntention intention, StreamableLoadingResult<TAsset> failure)
{
cache.IrrecoverableFailures.Add(intention.CommonArguments.GetCacheableURL(), failure);
cache.IrrecoverableFailures.TryAdd(intention.CommonArguments.GetCacheableURL(), failure);
return failure;
}
}
Expand Down

0 comments on commit 844f347

Please sign in to comment.