Skip to content

Commit 8273758

Browse files
committed
Stop the renderer regardless of Response.HasStarted.
1 parent cb32f94 commit 8273758

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.EventDispatch.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ private void SetNotFoundResponse(object? sender, EventArgs args)
8282
var navigationManager = _httpContext.RequestServices.GetRequiredService<NavigationManager>();
8383
var notFoundUri = $"{navigationManager.BaseUri}not-found";
8484
navigationManager.NavigateTo(notFoundUri);
85-
return;
8685
}
87-
_httpContext.Response.StatusCode = StatusCodes.Status404NotFound;
88-
_httpContext.Response.ContentType = null;
86+
else
87+
{
88+
_httpContext.Response.StatusCode = StatusCodes.Status404NotFound;
89+
_httpContext.Response.ContentType = null;
90+
}
8991
SignalRendererToFinishRendering();
9092
}
9193

0 commit comments

Comments
 (0)