diff --git a/src/core/lib/iomgr/resolve_address_custom.cc b/src/core/lib/iomgr/resolve_address_custom.cc index 64c33cdc0d4..b5c922b3ee5 100644 --- a/src/core/lib/iomgr/resolve_address_custom.cc +++ b/src/core/lib/iomgr/resolve_address_custom.cc @@ -71,6 +71,7 @@ void grpc_custom_resolve_callback(grpc_custom_resolver* r, grpc_resolved_addresses* result, grpc_error* error) { GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD(); + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; if (error == GRPC_ERROR_NONE) { *r->addresses = result; diff --git a/src/core/lib/iomgr/tcp_client_custom.cc b/src/core/lib/iomgr/tcp_client_custom.cc index 14a8b78dc68..6f236ae4d4e 100644 --- a/src/core/lib/iomgr/tcp_client_custom.cc +++ b/src/core/lib/iomgr/tcp_client_custom.cc @@ -101,6 +101,7 @@ static void custom_connect_callback_internal(grpc_custom_socket* socket, static void custom_connect_callback(grpc_custom_socket* socket, grpc_error* error) { + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; if (grpc_core::ExecCtx::Get() == nullptr) { /* If we are being run on a thread which does not have an exec_ctx created * yet, we should create one. */ diff --git a/src/core/lib/iomgr/tcp_custom.cc b/src/core/lib/iomgr/tcp_custom.cc index 66df5082e98..05cdd1ed358 100644 --- a/src/core/lib/iomgr/tcp_custom.cc +++ b/src/core/lib/iomgr/tcp_custom.cc @@ -145,6 +145,7 @@ static void call_read_cb(custom_tcp_endpoint* tcp, grpc_error* error) { static void custom_read_callback(grpc_custom_socket* socket, size_t nread, grpc_error* error) { + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; grpc_slice_buffer garbage; custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint; @@ -207,6 +208,7 @@ static void endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices, static void custom_write_callback(grpc_custom_socket* socket, grpc_error* error) { + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint; grpc_closure* cb = tcp->write_cb; @@ -301,6 +303,7 @@ static void custom_close_callback(grpc_custom_socket* socket) { grpc_custom_socket_vtable->destroy(socket); gpr_free(socket); } else if (socket->endpoint) { + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint; TCP_UNREF(tcp, "destroy"); @@ -343,6 +346,7 @@ grpc_endpoint* custom_tcp_endpoint_create(grpc_custom_socket* socket, char* peer_string) { custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)gpr_malloc(sizeof(custom_tcp_endpoint)); + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { diff --git a/src/core/lib/iomgr/tcp_server_custom.cc b/src/core/lib/iomgr/tcp_server_custom.cc index 767404be21d..c4fe5afb65b 100644 --- a/src/core/lib/iomgr/tcp_server_custom.cc +++ b/src/core/lib/iomgr/tcp_server_custom.cc @@ -245,6 +245,7 @@ static void custom_accept_callback(grpc_custom_socket* socket, static void custom_accept_callback(grpc_custom_socket* socket, grpc_custom_socket* client, grpc_error* error) { + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; grpc_tcp_listener* sp = socket->listener; if (error != GRPC_ERROR_NONE) {