aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Internal
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-07 22:07:40 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-07 22:07:40 -0700
commitc75c57c5af620491d0043047533fa0e2f078b09f (patch)
tree41f6c1ace5e84a7e2ce3fd37cf412bb1d1301275 /src/csharp/Grpc.Core/Internal
parentc8d7b8498c97694fcfc9d82d5aae64598697e7dd (diff)
added ResponseHeadersTest, fixed stylecop issues
Diffstat (limited to 'src/csharp/Grpc.Core/Internal')
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCall.cs2
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCallServer.cs3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
index c8c2449ee6..df5c07e4c4 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
@@ -279,7 +279,7 @@ namespace Grpc.Core.Internal
}
}
- public CallInvocationDetails<TRequest, TResponse> Details
+ public CallInvocationDetails<TRequest, TResponse> Details
{
get
{
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs
index 9eac7f7b61..1704b9afbf 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs
@@ -107,10 +107,11 @@ namespace Grpc.Core.Internal
{
lock (myLock)
{
+ Preconditions.CheckNotNull(headers, "metadata");
Preconditions.CheckNotNull(completionDelegate, "Completion delegate cannot be null");
Preconditions.CheckState(!initialMetadataSent, "Response headers can only be sent once per call.");
- Preconditions.CheckState(streamingWritesCounter > 0, "Response headers can only be sent before the first write starts.");
+ Preconditions.CheckState(streamingWritesCounter == 0, "Response headers can only be sent before the first write starts.");
CheckSendingAllowed();
Preconditions.CheckNotNull(completionDelegate, "Completion delegate cannot be null");