better source stream disposal for static files

pull/702/head
LukePulverenti 12 years ago
parent ca5acb6edc
commit 2828688ced

@ -40,9 +40,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer
/// </summary>
/// <param name="responseStream">The response stream.</param>
/// <returns>Task.</returns>
private Task WriteToAsync(Stream responseStream)
private async Task WriteToAsync(Stream responseStream)
{
return SourceStream.CopyToAsync(responseStream);
using (var src = SourceStream)
{
await src.CopyToAsync(responseStream).ConfigureAwait(false);
}
}
}
}

Loading…
Cancel
Save