diff options
author | 2015-09-30 15:59:52 -0700 | |
---|---|---|
committer | 2015-09-30 16:01:15 -0700 | |
commit | 3b147818e3aef9d77cce55e96447b568558f2e62 (patch) | |
tree | 99c38a0b2305ca769c9f2e0c8476d1971d99427d /src/core/client_config/subchannel.c | |
parent | 74abf42096ea961520fdc6cc465997ab909b9586 (diff) |
Added subchannel ability to unsubscribe to connectivity state changes.
Diffstat (limited to 'src/core/client_config/subchannel.c')
-rw-r--r-- | src/core/client_config/subchannel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index 740389003a..8665454460 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -413,6 +413,17 @@ void grpc_subchannel_notify_on_state_change(grpc_exec_ctx *exec_ctx, } } +int grpc_subchannel_state_change_unsubscribe(grpc_exec_ctx *exec_ctx, + grpc_subchannel *c, + grpc_closure *subscribed_notify) { + int success; + gpr_mu_lock(&c->mu); + success = grpc_connectivity_state_change_unsubscribe( + exec_ctx, &c->state_tracker, subscribed_notify); + gpr_mu_unlock(&c->mu); + return success; +} + void grpc_subchannel_process_transport_op(grpc_exec_ctx *exec_ctx, grpc_subchannel *c, grpc_transport_op *op) { |