diff options
author | Yuchen Zeng <zyc@google.com> | 2016-11-17 20:59:48 -0800 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-12-15 10:23:34 -0800 |
commit | f62706f2060a029ff9eaf178fc32946f7feda3c3 (patch) | |
tree | 368412254845785de0e760497acd2501e79ad9d5 /src/core | |
parent | 15521de93fc0a9feb2e1a555d249d8fd070ec9ab (diff) |
Add pollset_set in grpc_resolver
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ext/client_channel/resolver.c | 2 | ||||
-rw-r--r-- | src/core/ext/client_channel/resolver.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/core/ext/client_channel/resolver.c b/src/core/ext/client_channel/resolver.c index 2ae4fe862e..4a5e4f751b 100644 --- a/src/core/ext/client_channel/resolver.c +++ b/src/core/ext/client_channel/resolver.c @@ -36,6 +36,7 @@ void grpc_resolver_init(grpc_resolver *resolver, const grpc_resolver_vtable *vtable) { resolver->vtable = vtable; + resolver->pollset_set = grpc_pollset_set_create(); gpr_ref_init(&resolver->refs, 1); } @@ -62,6 +63,7 @@ void grpc_resolver_unref(grpc_resolver *resolver, void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) { #endif if (gpr_unref(&resolver->refs)) { + grpc_pollset_set_destroy(resolver->pollset_set); resolver->vtable->destroy(exec_ctx, resolver); } } diff --git a/src/core/ext/client_channel/resolver.h b/src/core/ext/client_channel/resolver.h index 96ece92b9d..d283120648 100644 --- a/src/core/ext/client_channel/resolver.h +++ b/src/core/ext/client_channel/resolver.h @@ -36,6 +36,7 @@ #include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/pollset_set.h" typedef struct grpc_resolver grpc_resolver; typedef struct grpc_resolver_vtable grpc_resolver_vtable; @@ -43,6 +44,7 @@ typedef struct grpc_resolver_vtable grpc_resolver_vtable; /** \a grpc_resolver provides \a grpc_channel_args objects to its caller */ struct grpc_resolver { const grpc_resolver_vtable *vtable; + grpc_pollset_set *pollset_set; gpr_refcount refs; }; |