aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Calls.cs
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-07-21 11:56:42 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-07-21 11:56:42 -0700
commit5269d16dd945db697a5c0128d4911b6d27ee6fb1 (patch)
tree61ca5101de653c09c02ff76851d6b457d73a5846 /src/csharp/Grpc.Core/Calls.cs
parented4b7a7c29843fe2d87e9cbbc21bf482d3c4f342 (diff)
codegen and API changes
Diffstat (limited to 'src/csharp/Grpc.Core/Calls.cs')
-rw-r--r--src/csharp/Grpc.Core/Calls.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Calls.cs b/src/csharp/Grpc.Core/Calls.cs
index 61231ba612..359fe53741 100644
--- a/src/csharp/Grpc.Core/Calls.cs
+++ b/src/csharp/Grpc.Core/Calls.cs
@@ -53,7 +53,7 @@ namespace Grpc.Core
return asyncCall.UnaryCall(call.Channel, call.Name, req, call.Headers);
}
- public static async Task<TResponse> AsyncUnaryCall<TRequest, TResponse>(Call<TRequest, TResponse> call, TRequest req, CancellationToken token)
+ public static AsyncUnaryCall<TResponse> AsyncUnaryCall<TRequest, TResponse>(Call<TRequest, TResponse> call, TRequest req, CancellationToken token)
where TRequest : class
where TResponse : class
{
@@ -61,7 +61,7 @@ namespace Grpc.Core
asyncCall.Initialize(call.Channel, call.Channel.CompletionQueue, call.Name);
var asyncResult = asyncCall.UnaryCallAsync(req, call.Headers);
RegisterCancellationCallback(asyncCall, token);
- return await asyncResult;
+ return new AsyncUnaryCall<TResponse>(asyncResult, asyncCall.GetStatus, asyncCall.GetTrailers, asyncCall.Cancel);
}
public static AsyncServerStreamingCall<TResponse> AsyncServerStreamingCall<TRequest, TResponse>(Call<TRequest, TResponse> call, TRequest req, CancellationToken token)