Fixing invocation results for tasks whose result is `VoidTaskResult`
This commit is contained in:
parent
5f23231d9b
commit
8d03c014fb
|
|
@ -144,8 +144,11 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
if (resultTask != null)
|
if (resultTask != null)
|
||||||
{
|
{
|
||||||
await resultTask;
|
await resultTask;
|
||||||
var property = resultTask.GetType().GetProperty("Result");
|
if (methodInfo.ReturnType.GetTypeInfo().IsGenericType)
|
||||||
invocationResult.Result = property?.GetValue(resultTask);
|
{
|
||||||
|
var property = resultTask.GetType().GetProperty("Result");
|
||||||
|
invocationResult.Result = property?.GetValue(resultTask);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue