Skip to content
Snippets Groups Projects
Commit 820e0834 authored by Yuchen Zeng's avatar Yuchen Zeng
Browse files

Fix SetSocketMutator

parent 264a2108
No related branches found
No related tags found
No related merge requests found
...@@ -101,8 +101,10 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { ...@@ -101,8 +101,10 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) {
for (auto it = args_.begin(); it != args_.end(); ++it) { for (auto it = args_.begin(); it != args_.end(); ++it) {
if (it->type == mutator_arg.type && if (it->type == mutator_arg.type &&
grpc::string(it->key) == grpc::string(mutator_arg.key)) { 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.vtable->destroy(&exec_ctx, it->value.pointer.p);
it->value.pointer = mutator_arg.value.pointer; it->value.pointer = mutator_arg.value.pointer;
replaced = true;
} }
} }
grpc_exec_ctx_finish(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment