update service creation

This commit is contained in:
Luke Pulverenti
2017-09-03 03:28:58 -04:00
parent e0c1d740a3
commit 2084678266
10 changed files with 78 additions and 69 deletions

View File

@@ -45,10 +45,15 @@ namespace Emby.Server.Implementations.Services
var bytesResponse = this.Response as byte[];
if (bytesResponse != null)
{
if (response != null)
response.SetContentLength(bytesResponse.Length);
var contentLength = bytesResponse.Length;
await responseStream.WriteAsync(bytesResponse, 0, bytesResponse.Length).ConfigureAwait(false);
if (response != null)
response.SetContentLength(contentLength);
if (contentLength > 0)
{
await responseStream.WriteAsync(bytesResponse, 0, contentLength).ConfigureAwait(false);
}
return;
}