Use async json serialization.

pull/3679/head
Patrick Barron 4 years ago
parent 1ee8790189
commit 1aa853067a

@ -113,7 +113,7 @@ namespace Jellyfin.Server.Implementations.Users
await using (FileStream fileStream = File.OpenWrite(filePath)) await using (FileStream fileStream = File.OpenWrite(filePath))
{ {
fileStream.Write(JsonSerializer.SerializeToUtf8Bytes(spr)); await JsonSerializer.SerializeAsync(fileStream, spr).ConfigureAwait(false);
await fileStream.FlushAsync().ConfigureAwait(false); await fileStream.FlushAsync().ConfigureAwait(false);
} }

Loading…
Cancel
Save