diff options
author | 2017-01-09 14:58:12 -0800 | |
---|---|---|
committer | 2017-01-09 14:58:12 -0800 | |
commit | e93b028f07addb13240e636aaea837e3f0eaa9c4 (patch) | |
tree | 2c0c502c9ca42413c1d87210cfe9cedcb7b2bcef /src/cpp/common/channel_arguments.cc | |
parent | d191d31e4963b23255840ffe648290ab92d5e8bc (diff) | |
parent | 6cf58c81731343e0ffb134febd3e576425399e5e (diff) |
Merge branch 'master' into tweak_slice_buffer
Diffstat (limited to 'src/cpp/common/channel_arguments.cc')
-rw-r--r-- | src/cpp/common/channel_arguments.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 0301b5b8ec..1fdd106130 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -38,8 +38,11 @@ #include <grpc++/resource_quota.h> #include <grpc/impl/codegen/grpc_types.h> #include <grpc/support/log.h> +extern "C" { #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" +} namespace grpc { ChannelArguments::ChannelArguments() { @@ -94,13 +97,15 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { } grpc_arg mutator_arg = grpc_socket_mutator_to_arg(mutator); bool replaced = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; for (auto it = args_.begin(); it != args_.end(); ++it) { if (it->type == mutator_arg.type && grpc::string(it->key) == grpc::string(mutator_arg.key)) { - it->value.pointer.vtable->destroy(it->value.pointer.p); + it->value.pointer.vtable->destroy(&exec_ctx, it->value.pointer.p); it->value.pointer = mutator_arg.value.pointer; } } + grpc_exec_ctx_finish(&exec_ctx); if (!replaced) { args_.push_back(mutator_arg); } |