Ver código fonte

dispose content stream with StaticRemoteStreamWriter

Luke Pulverenti 11 anos atrás
pai
commit
a5b4ae8b39

+ 4 - 1
MediaBrowser.Api/Playback/StaticRemoteStreamWriter.cs

@@ -40,7 +40,10 @@ namespace MediaBrowser.Api.Playback
         /// <param name="responseStream">The response stream.</param>
         public void WriteTo(Stream responseStream)
         {
-            _response.Content.CopyTo(responseStream, 819200);
+            using (_response)
+            {
+                _response.Content.CopyTo(responseStream, 819200);
+            }
         }
     }
 }