aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Services')
-rw-r--r--Emby.Server.Implementations/Services/ResponseHelper.cs4
-rw-r--r--Emby.Server.Implementations/Services/ServiceController.cs6
-rw-r--r--Emby.Server.Implementations/Services/ServiceHandler.cs3
3 files changed, 6 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Services/ResponseHelper.cs b/Emby.Server.Implementations/Services/ResponseHelper.cs
index 58ee22ecb..84dc343c3 100644
--- a/Emby.Server.Implementations/Services/ResponseHelper.cs
+++ b/Emby.Server.Implementations/Services/ResponseHelper.cs
@@ -124,7 +124,7 @@ namespace Emby.Server.Implementations.Services
response.ContentType = "application/octet-stream";
response.SetContentLength(bytes.Length);
- await response.OutputStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
+ await response.OutputStream.WriteAsync(bytes, 0, bytes.Length, cancellationToken).ConfigureAwait(false);
return;
}
@@ -133,7 +133,7 @@ namespace Emby.Server.Implementations.Services
{
bytes = Encoding.UTF8.GetBytes(responseText);
response.SetContentLength(bytes.Length);
- await response.OutputStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
+ await response.OutputStream.WriteAsync(bytes, 0, bytes.Length, cancellationToken).ConfigureAwait(false);
return;
}
diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs
index d283bf81f..1c530144c 100644
--- a/Emby.Server.Implementations/Services/ServiceController.cs
+++ b/Emby.Server.Implementations/Services/ServiceController.cs
@@ -187,7 +187,7 @@ namespace Emby.Server.Implementations.Services
return null;
}
- public async Task<object> Execute(HttpListenerHost appHost, object requestDto, IRequest req)
+ public Task<object> Execute(HttpListenerHost appHost, object requestDto, IRequest req)
{
req.Dto = requestDto;
var requestType = requestDto.GetType();
@@ -209,9 +209,7 @@ namespace Emby.Server.Implementations.Services
req.Dto = requestDto;
//Executes the service and returns the result
- var response = await ServiceExecGeneral.Execute(serviceType, req, service, requestDto, requestType.GetMethodName()).ConfigureAwait(false);
-
- return response;
+ return ServiceExecGeneral.Execute(serviceType, req, service, requestDto, requestType.GetMethodName());
}
}
diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs
index 95a9dd682..526e62d39 100644
--- a/Emby.Server.Implementations/Services/ServiceHandler.cs
+++ b/Emby.Server.Implementations/Services/ServiceHandler.cs
@@ -143,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)