aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-19 13:26:48 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-19 13:26:48 -0700
commit2406e31b839b3d0106658431943f3f03c2df2358 (patch)
treefeade727794f4ced318cab13ce46ccf541e1a402 /test
parentfa95818efad4c05aec3aaf2b29ff888100dc6b69 (diff)
Avoid TSAN reported lock cycle
Diffstat (limited to 'test')
-rw-r--r--test/core/iomgr/tcp_server_posix_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c
index 6b1dd428a1..5791f562e1 100644
--- a/test/core/iomgr/tcp_server_posix_test.c
+++ b/test/core/iomgr/tcp_server_posix_test.c
@@ -118,8 +118,11 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp,
grpc_endpoint_shutdown(exec_ctx, tcp);
grpc_endpoint_destroy(exec_ctx, tcp);
+ on_connect_result temp_result;
+ on_connect_result_set(&temp_result, acceptor);
+
gpr_mu_lock(g_mu);
- on_connect_result_set(&g_result, acceptor);
+ g_result = temp_result;
g_nconnects++;
GPR_ASSERT(
GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)));