aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/compress_filter.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-26 13:00:44 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-26 13:00:44 -0700
commit89c5cb596df9f3bbbf1d024fb59df2b799c85fba (patch)
treebb9ae905ada472eb788c485b09dd8db214fb227d /src/core/lib/channel/compress_filter.c
parent6c8ae9aad5f1aaaf9c043817e184ec26bee75c86 (diff)
parentc3d869ef5853c4cfad57b7d3694d5260eeb7ce75 (diff)
Merge github.com:grpc/grpc into split-me-baby-one-more-time
Diffstat (limited to 'src/core/lib/channel/compress_filter.c')
-rw-r--r--src/core/lib/channel/compress_filter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c
index 731304efc0..bac0811fd3 100644
--- a/src/core/lib/channel/compress_filter.c
+++ b/src/core/lib/channel/compress_filter.c
@@ -268,8 +268,14 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx,
channeld->default_compression_algorithm =
grpc_channel_args_get_compression_algorithm(args->channel_args);
/* Make sure the default isn't disabled. */
- GPR_ASSERT(grpc_compression_options_is_algorithm_enabled(
- &channeld->compression_options, channeld->default_compression_algorithm));
+ if (!grpc_compression_options_is_algorithm_enabled(
+ &channeld->compression_options,
+ channeld->default_compression_algorithm)) {
+ gpr_log(GPR_DEBUG,
+ "compression algorithm %d not enabled: switching to none",
+ channeld->default_compression_algorithm);
+ channeld->default_compression_algorithm = GRPC_COMPRESS_NONE;
+ }
channeld->compression_options.default_compression_algorithm =
channeld->default_compression_algorithm;