Skip to content

Commit

Permalink
Added use of host and CallOptions in AsyncDynamicCall
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Pustelnik committed Oct 25, 2022
1 parent 7501d07 commit 17e1c64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DynamicGrpc/DynamicGrpcClient.cs
Expand Up @@ -102,7 +102,7 @@ public static async Task<DynamicGrpcClient> FromServerReflection(ChannelBase cha
if (methodDescriptor.IsServerStreaming)
{
// Full streaming duplex
var call = AsyncDuplexStreamingCall(serviceName, methodName);
var call = AsyncDuplexStreamingCall(serviceName, methodName, host, options);
await foreach (var item in input)
{
await call.RequestStream.WriteAsync(item);
Expand All @@ -118,7 +118,7 @@ await foreach (var item in input)
else
{
// Client streaming only
var call = AsyncClientStreamingCall(serviceName, methodName);
var call = AsyncClientStreamingCall(serviceName, methodName, host, options);
await foreach (var item in input)
{
await call.RequestStream.WriteAsync(item);
Expand All @@ -139,7 +139,7 @@ await foreach (var item in input)
break; // Take only the first element
}

var call = AsyncServerStreamingCall(serviceName, methodName, firstInput ?? new Dictionary<string, object>());
var call = AsyncServerStreamingCall(serviceName, methodName, firstInput ?? new Dictionary<string, object>(), host, options);
var responseStream = call.ResponseStream;
while (await responseStream.MoveNext())
{
Expand All @@ -156,7 +156,7 @@ await foreach (var item in input)
break; // Take only the first element
}

var result = await AsyncUnaryCall(serviceName, methodName, firstInput ?? new Dictionary<string, object>());
var result = await AsyncUnaryCall(serviceName, methodName, firstInput ?? new Dictionary<string, object>(), host, options);
yield return result;
}
}
Expand Down

0 comments on commit 17e1c64

Please sign in to comment.