fix: dispose gzip stream
This commit is contained in:
parent
9d95363d01
commit
4d7f0599f3
|
@ -84,8 +84,9 @@ public class Plugin : IDalamudPlugin {
|
|||
Task.Run(async () => {
|
||||
var mem = new MemoryStream();
|
||||
var gz = new GZipStream(mem, CompressionLevel.Optimal);
|
||||
gz.Write(Encoding.UTF8.GetBytes(json));
|
||||
gz.Flush();
|
||||
await gz.WriteAsync(Encoding.UTF8.GetBytes(json));
|
||||
await gz.FlushAsync();
|
||||
await gz.DisposeAsync();
|
||||
|
||||
var req = new HttpRequestMessage(HttpMethod.Post, "http://localhost:30888/upload") {
|
||||
Content = new ByteArrayContent(mem.ToArray()) {
|
||||
|
|
Loading…
Reference in New Issue