Skip to content

Commit

Permalink
FIX: CHALKY-956 - optimised error response stream manipulation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpop-zengenti committed Apr 30, 2024
1 parent cdf58fe commit 4ddaf89
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ public EndpointResponse(
}

var stream = new MemoryStream();
using (var writer = new StreamWriter(stream, leaveOpen: true))
{
writer.Write(StringContent);
writer.Flush();
}

// TODO: find a solution to write to stream without closing it
var writer = new StreamWriter(stream);
writer.Write(StringContent);
writer.Flush();
stream.Position = 0;
return stream;
}
Expand Down

0 comments on commit 4ddaf89

Please sign in to comment.