Skip to content

Commit

Permalink
Core - ResourceHandler.ForErrorMessage auto dispose of Stream
Browse files Browse the repository at this point in the history
Dispose of stream when done, cannot reuse ResourceHandler.

Follow up to #4119
  • Loading branch information
amaitland committed Aug 9, 2022
1 parent 4a972f6 commit fd5e81d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CefSharp/ResourceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public static IResourceHandler ForErrorMessage(string errorMessage, HttpStatusCo
{
var stream = GetMemoryStream(errorMessage, Encoding.UTF8);

var resourceHandler = FromStream(stream);
var resourceHandler = FromStream(stream, autoDisposeStream: true);
resourceHandler.StatusCode = (int)statusCode;

return resourceHandler;
Expand Down

0 comments on commit fd5e81d

Please sign in to comment.