Fixing invocation results for tasks whose result is `VoidTaskResult`

This commit is contained in:
Pawel Kadluczka 2016-11-02 22:34:21 -07:00
parent 5f23231d9b
commit 8d03c014fb
1 changed files with 5 additions and 2 deletions

View File

@ -144,8 +144,11 @@ namespace Microsoft.AspNetCore.SignalR
if (resultTask != null)
{
await resultTask;
var property = resultTask.GetType().GetProperty("Result");
invocationResult.Result = property?.GetValue(resultTask);
if (methodInfo.ReturnType.GetTypeInfo().IsGenericType)
{
var property = resultTask.GetType().GetProperty("Result");
invocationResult.Result = property?.GetValue(resultTask);
}
}
else
{