Fix SetSocketMutator

pull/10151/head
Yuchen Zeng 8 years ago
parent 264a210878
commit 820e0834aa
  1. 2
      src/cpp/common/channel_arguments.cc

@ -101,8 +101,10 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) {
for (auto it = args_.begin(); it != args_.end(); ++it) {
if (it->type == mutator_arg.type &&
grpc::string(it->key) == grpc::string(mutator_arg.key)) {
GPR_ASSERT(!replaced);
it->value.pointer.vtable->destroy(&exec_ctx, it->value.pointer.p);
it->value.pointer = mutator_arg.value.pointer;
replaced = true;
}
}
grpc_exec_ctx_finish(&exec_ctx);

Loading…
Cancel
Save