Fix race
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index ea579cf..7d78bfa 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -478,9 +478,6 @@
ref_transport(t);
gpr_mu_unlock(&t->mu);
- ref_transport(t);
- recv_data(t, slices, nslices, GRPC_ENDPOINT_CB_OK);
-
sr = setup(arg, &t->base, t->metadata_context);
lock(t);
@@ -488,6 +485,10 @@
t->cb_user_data = sr.user_data;
t->calling_back = 0;
unlock(t);
+
+ ref_transport(t);
+ recv_data(t, slices, nslices, GRPC_ENDPOINT_CB_OK);
+
unref_transport(t);
}