diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-31 15:40:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-31 15:40:34 -0400 |
| commit | 91176d9ccc1dde8155c10411c70e62a9f4b059d5 (patch) | |
| tree | 21365f5a8dd09534a53d9f88d2a7a3116f3f3f98 /Emby.Server.Implementations/Services/ServiceHandler.cs | |
| parent | c37c9a75073b1b9caa3af2c3bc62abd837bd630e (diff) | |
| parent | 4e10daf646e0788409f2bc52ef70effa2616e3f3 (diff) | |
Merge pull request #2677 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Services/ServiceHandler.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/ServiceHandler.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs index 8b59b4843..526e62d39 100644 --- a/Emby.Server.Implementations/Services/ServiceHandler.cs +++ b/Emby.Server.Implementations/Services/ServiceHandler.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Reflection; +using System.Threading; using System.Threading.Tasks; using Emby.Server.Implementations.HttpServer; using MediaBrowser.Model.Logging; @@ -123,7 +124,7 @@ namespace Emby.Server.Implementations.Services // Set from SSHHF.GetHandlerForPathInfo() public string ResponseContentType { get; set; } - public async Task ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, string operationName) + public async Task ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, string operationName, CancellationToken cancellationToken) { var restPath = GetRestPath(httpReq.Verb, httpReq.PathInfo); if (restPath == null) @@ -142,7 +143,8 @@ namespace Emby.Server.Implementations.Services var rawResponse = await appHost.ServiceController.Execute(appHost, request, httpReq).ConfigureAwait(false); - var response = await HandleResponseAsync(rawResponse).ConfigureAwait(false); + //var response = await HandleResponseAsync(rawResponse).ConfigureAwait(false); + var response = rawResponse; // Apply response filters foreach (var responseFilter in appHost.ResponseFilters) @@ -150,7 +152,7 @@ namespace Emby.Server.Implementations.Services responseFilter(httpReq, httpRes, response); } - await ResponseHelper.WriteToResponse(httpRes, httpReq, response).ConfigureAwait(false); + await ResponseHelper.WriteToResponse(httpRes, httpReq, response, cancellationToken).ConfigureAwait(false); } public static object CreateRequest(HttpListenerHost host, IRequest httpReq, RestPath restPath, ILogger logger) |
