diff options
author | Yang Gao <yangg@google.com> | 2015-02-17 11:01:07 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-02-17 11:01:07 -0800 |
commit | 2cf952730daa9e167bf261276fa77fad5312c6ff (patch) | |
tree | 3e049cacb990317740cf7bae696e4d08530c01a2 | |
parent | d745705fff04062fda44da1ad7eac9f6f4498495 (diff) |
Deserialization success should not override earlier failure
-rw-r--r-- | src/cpp/common/call.cc | 2 | ||||
-rw-r--r-- | src/cpp/server/server.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index df800d940d..9ec93bc626 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -254,7 +254,7 @@ void CallOpBuffer::FinalizeResult(void** tag, bool* status) { if (recv_message_) { if (recv_message_buf_) { got_message = true; - *status = DeserializeProto(recv_message_buf_, recv_message_); + *status &= DeserializeProto(recv_message_buf_, recv_message_); grpc_byte_buffer_destroy(recv_message_buf_); recv_message_buf_ = nullptr; } else { diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 294eeae585..35ced54aa7 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -314,7 +314,7 @@ class Server::AsyncRequest final : public CompletionQueueTag { *tag = tag_; if (*status && request_) { if (payload_) { - *status = DeserializeProto(payload_, request_); + *status &= DeserializeProto(payload_, request_); } else { *status = false; } |