diff options
author | 2016-11-08 07:20:27 -0800 | |
---|---|---|
committer | 2016-11-08 07:20:27 -0800 | |
commit | b720b609eaa7ad6ca009e55bf773ec32e9c68f6a (patch) | |
tree | 555719efdc4bbe6b41a573b02a565c917e6e4e27 /src/core/lib/surface | |
parent | 32df467f1189c2b1bc7010b0a99932a7a3fb2684 (diff) | |
parent | 150fbe1e5f1b2a88c35b39480770eb1503692bed (diff) |
Merge github.com:grpc/grpc into grpc_slice
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r-- | src/core/lib/surface/call.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 62c0ec83a1..eafcba22fc 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1462,6 +1462,12 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, grpc_slice_buffer_stream_init( &call->sending_stream, &op->data.send_message->data.raw.slice_buffer, op->flags); + /* If the outgoing buffer is already compressed, mark it as so in the + flags. These will be picked up by the compression filter and further + (wasteful) attempts at compression skipped. */ + if (op->data.send_message->data.raw.compression > GRPC_COMPRESS_NONE) { + call->sending_stream.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS; + } stream_op->send_message = &call->sending_stream.base; break; case GRPC_OP_SEND_CLOSE_FROM_CLIENT: |