Skip to content

Commit

Permalink
Fix .NET Standard 2.0 merge (#1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK authored Feb 17, 2021
1 parent 927c0e5 commit 3c675be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Grpc.Net.Client/Internal/GrpcCall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ private async Task RunCall(HttpRequestMessage request, TimeSpan? timeout)
{
// Don't log OperationCanceledException if deadline has exceeded.
if (ex is OperationCanceledException &&
_callTcs.Task.IsCompletedSuccessfully &&
_callTcs.Task.IsCompletedSuccessfully() &&
_callTcs.Task.Result.StatusCode == StatusCode.DeadlineExceeded)
{
throw;
Expand Down
6 changes: 5 additions & 1 deletion test/Shared/ResponseUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static HttpResponseMessage CreateResponse(
{
foreach (var customTrailer in customTrailers)
{
message.TrailingHeaders.Add(customTrailer.Key, customTrailer.Value);
message.TrailingHeaders().Add(customTrailer.Key, customTrailer.Value);
}
}

Expand All @@ -111,6 +111,10 @@ public static HttpResponseMessage CreateHeadersOnlyResponse(
Version = version ?? ProtocolVersion
};

message.RequestMessage = new HttpRequestMessage();
#if NET472
message.RequestMessage.Properties[CompatibilityExtensions.ResponseTrailersKey] = new ResponseTrailers();
#endif
message.Headers.Add(MessageEncodingHeader, grpcEncoding ?? IdentityGrpcEncoding);
if (retryPushbackHeader != null)
{
Expand Down

0 comments on commit 3c675be

Please sign in to comment.