diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-13 10:45:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-13 10:45:15 +0200 |
| commit | 4fc27fa63eb5a88a1a67a7ba67e969468f79a48d (patch) | |
| tree | 3275848551b4a2c5a844bdbd2d14f0697637b79e /Emby.Server.Implementations/Channels/ChannelManager.cs | |
| parent | 5277339982f57c6e882db3313ee302667cce2ffb (diff) | |
| parent | d7748cfa0476280cce9dba34b4512cc58760c8bb (diff) | |
Merge pull request #10390 from Bond-009/streams
Diffstat (limited to 'Emby.Server.Implementations/Channels/ChannelManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelManager.cs | 7 |
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 /> |
