aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Channels
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2023-10-11 18:32:57 +0200
committerBond_009 <bond.009@outlook.com>2023-10-11 18:32:57 +0200
commitd7748cfa0476280cce9dba34b4512cc58760c8bb (patch)
tree368389260833164e812cbb192989023c017cd755 /Emby.Server.Implementations/Channels
parent26571a8c51b9670f198e58175463e1d3db5441ee (diff)
Multiple Stream changes
* Remove useless MemoryStream in DlnaHttpClient * Use HttpContent.ReadFromJsonAsync extension * Call ConfigureAwait for IAsyncDisposable * Use HttpContent.CopyToAsync where possible
Diffstat (limited to 'Emby.Server.Implementations/Channels')
-rw-r--r--Emby.Server.Implementations/Channels/ChannelManager.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs
index 961e225e9..3036cbcf7 100644
--- a/Emby.Server.Implementations/Channels/ChannelManager.cs
+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs
@@ -371,8 +371,11 @@ namespace Emby.Server.Implementations.Channels
Directory.CreateDirectory(Path.GetDirectoryName(path));
- await using FileStream createStream = File.Create(path);
- await JsonSerializer.SerializeAsync(createStream, mediaSources, _jsonOptions).ConfigureAwait(false);
+ FileStream createStream = File.Create(path);
+ await using (createStream.ConfigureAwait(false))
+ {
+ await JsonSerializer.SerializeAsync(createStream, mediaSources, _jsonOptions).ConfigureAwait(false);
+ }
}
/// <inheritdoc />