diff options
author | Craig Tiller <ctiller@google.com> | 2016-12-29 10:11:40 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-12-29 10:11:40 -0800 |
commit | d6887e0e4eaa68c10145cd2f730da8fb709a0588 (patch) | |
tree | 8fae027e0f1252af8dc582581856e29fb0e50e48 /src/core | |
parent | 3cb3447e49b81dc2e4dcb66170eda3b04766eaba (diff) |
Some fixes
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lib/iomgr/executor.c | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/tcp_client_posix.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.c index 37a7142792..5f2a789e30 100644 --- a/src/core/lib/iomgr/executor.c +++ b/src/core/lib/iomgr/executor.c @@ -115,6 +115,8 @@ static void maybe_spawn_locked() { static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_error *error) { gpr_mu_lock(&g_executor.mu); + GPR_ASSERT(closure->scheduler == grpc_executor_scheduler); + closure->scheduler = grpc_schedule_on_exec_ctx; if (g_executor.shutting_down == 0) { grpc_closure_list_append(&g_executor.closures, closure, error); maybe_spawn_locked(); diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index be7b695ad6..d089d2bc3b 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -342,8 +342,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, addr_str = NULL; gpr_mu_init(&ac->mu); ac->refs = 2; - ac->write_closure.cb = on_writable; - ac->write_closure.cb_arg = ac; + grpc_closure_init(&ac->write_closure, on_writable, ac, + grpc_schedule_on_exec_ctx); ac->channel_args = grpc_channel_args_copy(channel_args); if (grpc_tcp_trace) { |