aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-07-31 16:38:08 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-07-31 16:38:08 -0400
commita7b25c065c831804c701c44f30b277c9c7689ac3 (patch)
tree9a6ec8af764cefcb414dbc172804203cc7df908c /MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs
parent25395c5d82a9136253706a7fed5a552dcc452acd (diff)
update stream buffering
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs b/MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs
index fe662542e..daa5b86d9 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/StreamWriter.cs
@@ -81,6 +81,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer
WriteToInternal(responseStream);
}
+ // 256k
+ private const int BufferSize = 262144;
+
/// <summary>
/// Writes to async.
/// </summary>
@@ -92,7 +95,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{
using (var src = SourceStream)
{
- src.CopyTo(responseStream);
+ src.CopyTo(responseStream, BufferSize);
}
}
catch (Exception ex)