From 7062618a8f7809060a85400f9a5db0ae54090d7f Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 18 May 2022 20:33:30 +1000 Subject: [PATCH] Fix infinite loop on cache file read error. --- src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs b/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs index 5320c281..19d64d86 100644 --- a/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs +++ b/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs @@ -591,7 +591,7 @@ private async Task SendResponseAsync( // This can happen if the cached image has been physically deleted but the item is still in the LRU cache. // We'll retry running the request again in it's entirety. This ensures any changes to the source are tracked also. CacheResolverLru.TryRemove(key); - await this.Invoke(httpContext); + await this.Invoke(httpContext, true); return; }