Skip to content

Commit a4f6f01

Browse files
mgoodfellowTurnerj
andauthored
Update src/CacheTower.Extensions.Redis/RedisLockExtension.cs
Co-authored-by: James Turner <Turnerj@users.noreply.github.com>
1 parent 93c86f9 commit a4f6f01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/CacheTower.Extensions.Redis/RedisLockExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public async ValueTask<CacheEntry<T>> WithRefreshAsync<T>(string cacheKey, Func<
9292
{
9393
var tcs = new TaskCompletionSource<bool>();
9494
var cts = new CancellationTokenSource(Options.LockTimeout);
95-
cts.Token.Register(() => tcs.TrySetCanceled(), useSynchronizationContext: false);
95+
cts.Token.Register(tcs => ((TaskCompletionSource<bool>)tcs).TrySetCanceled(), tcs, useSynchronizationContext: false);
9696
return tcs;
9797
});
9898

0 commit comments

Comments
 (0)