Replace direct closure callback calls with GRPC_CLOSURE_SCHED

pull/20139/head
Yash Tibrewal 5 years ago
parent d9c9b52a68
commit e6ffb2c3bb
  1. 2
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  2. 2
      src/core/lib/iomgr/tcp_posix.cc

@ -266,7 +266,7 @@ static void tcp_server_shutdown_complete(void* arg, grpc_error* error) {
// may do a synchronous unref.
grpc_core::ExecCtx::Get()->Flush();
if (destroy_done != nullptr) {
destroy_done->cb(destroy_done->cb_arg, GRPC_ERROR_REF(error));
GRPC_CLOSURE_SCHED(destroy_done, GRPC_ERROR_REF(error));
grpc_core::ExecCtx::Get()->Flush();
}
grpc_channel_args_destroy(state->args);

@ -1020,7 +1020,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) {
if (error != GRPC_ERROR_NONE) {
cb = tcp->write_cb;
tcp->write_cb = nullptr;
cb->cb(cb->cb_arg, error);
GRPC_CLOSURE_SCHED(cb, error);
TCP_UNREF(tcp, "write");
return;
}

Loading…
Cancel
Save