diff options
author | 2017-01-26 23:16:00 -0800 | |
---|---|---|
committer | 2017-01-26 23:16:00 -0800 | |
commit | eb30fd1df5a474d63d4a4f9262cd8fe87fd19868 (patch) | |
tree | 5122e971407526ba5d8139a6666dbfa314f51957 /include/grpc++/impl/codegen/proto_utils.h | |
parent | de78a21579dabf84a7710fce2ff4fa2bfdb7e04c (diff) | |
parent | 4edd56751f8309f55922518f2598c35f3c007b1e (diff) |
Merge pull request #9404 from ctiller/maxmsgsz
Remove double-checking of max-message-size in C++ layers
Diffstat (limited to 'include/grpc++/impl/codegen/proto_utils.h')
-rw-r--r-- | include/grpc++/impl/codegen/proto_utils.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 2f15487591..2123b62ed9 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -203,8 +203,7 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of< } static Status Deserialize(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_receive_message_size) { + grpc::protobuf::Message* msg) { if (buffer == nullptr) { return Status(StatusCode::INTERNAL, "No payload"); } @@ -215,10 +214,7 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of< return reader.status(); } ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_receive_message_size > 0) { - decoder.SetTotalBytesLimit(max_receive_message_size, - max_receive_message_size); - } + decoder.SetTotalBytesLimit(INT_MAX, INT_MAX); if (!msg->ParseFromCodedStream(&decoder)) { result = Status(StatusCode::INTERNAL, msg->InitializationErrorString()); } |