aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/compress_filter.c
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-04-27 19:15:12 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-04-27 19:15:12 -0700
commit12e111c6929a689f37fd18deebe5ca64a088094f (patch)
treecbcfbb5be704f3b8bcd99672194684e608a7d662 /src/core/lib/channel/compress_filter.c
parentd312a0b866b0223bf9d5a2c88530a5cd7005c990 (diff)
parente2fd65343e468735676485ba0e3517401c7db1b5 (diff)
Merge branch 'master' of github.com:grpc/grpc into lb_pollset_propagation
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 3eb62d3b5f..d7c835bc01 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;