diff options
author | Craig Tiller <ctiller@google.com> | 2016-04-24 22:45:28 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-04-24 22:45:28 -0700 |
commit | d2906ad80cc4dedd017fa4f4992c20fdffb8c238 (patch) | |
tree | d8382f49d3c23823f08e7126a0c3d3c031fe485d /src/core | |
parent | a803fac758665a4f350b663bf56da7a48078fe29 (diff) |
Fix bug
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lib/channel/compress_filter.c | 10 |
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 229fdb5ef6..3d42d0e616 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; |