diff options
author | David Garcia Quintas <dgq@google.com> | 2016-06-30 18:17:27 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-06-30 18:17:27 -0700 |
commit | 89d8f1697c2bf4a6691203d4a5f6fd495241696e (patch) | |
tree | 4376144e1996c2d1e6329b8193b56174f44ec88d /src/objective-c/GRPCClient | |
parent | 9a2320e40e105ec2ffc1d9b892b12b5afb8f9e17 (diff) |
Added comment for obj-c
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r-- | src/objective-c/GRPCClient/private/NSData+GRPC.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 99c882ee92..98337799e9 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -43,6 +43,10 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, size_t *length, char **array) { grpc_byte_buffer_reader reader; if (!grpc_byte_buffer_reader_init(&reader, buffer)) { + // grpc_byte_buffer_reader_init can fail if the data sent by the server + // could not be decompressed for any reason. This is an issue with the data + // coming from the server and thus we want the RPC to fail with error code + // INTERNAL. *array = NULL; *length = 0; return; |