aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/SocketSharp
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-11-28 00:42:25 -0500
committerGitHub <noreply@github.com>2016-11-28 00:42:25 -0500
commitf92e245dfffbc3fdf020a7fcc71faf10a9b7e305 (patch)
tree726f0145b9fcda6c671440f2261e0222359090fd /Emby.Server.Implementations/HttpServer/SocketSharp
parent79eabe1e5888c6866c946276a367ee5c25620763 (diff)
parent56b24da15165ef4c4b7107b673bab5b191d76afe (diff)
Merge pull request #2315 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/SocketSharp')
-rw-r--r--Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpResponse.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpResponse.cs b/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpResponse.cs
index dc049cbde..36f795411 100644
--- a/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpResponse.cs
+++ b/Emby.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpResponse.cs
@@ -4,6 +4,7 @@ using System.IO;
using System.Net;
using System.Text;
using MediaBrowser.Model.Logging;
+using SocketHttpListener.Net;
using HttpListenerResponse = SocketHttpListener.Net.HttpListenerResponse;
using IHttpResponse = MediaBrowser.Model.Services.IHttpResponse;
using IRequest = MediaBrowser.Model.Services.IRequest;
@@ -101,12 +102,15 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
var outputStream = response.OutputStream;
// This is needed with compression
- //if (!string.IsNullOrWhiteSpace(GetHeader("Content-Encoding")))
+ if (outputStream is ResponseStream)
{
- outputStream.Flush();
- }
+ //if (!string.IsNullOrWhiteSpace(GetHeader("Content-Encoding")))
+ {
+ outputStream.Flush();
+ }
- outputStream.Dispose();
+ outputStream.Dispose();
+ }
response.Close();
}
catch (Exception ex)