Skip to content
Snippets Groups Projects
Commit 556875d1 authored by Nicolas Noble's avatar Nicolas Noble
Browse files

Merge pull request #2559 from ctiller/holographic-ninja-soda

Fix (forever) a TSAN bug thats plagued us
parents 0ac55806 26205360
No related branches found
No related tags found
No related merge requests found
...@@ -114,6 +114,8 @@ static void on_writable(void *acp, int success) { ...@@ -114,6 +114,8 @@ static void on_writable(void *acp, int success) {
void (*cb)(void *arg, grpc_endpoint *tcp) = ac->cb; void (*cb)(void *arg, grpc_endpoint *tcp) = ac->cb;
void *cb_arg = ac->cb_arg; void *cb_arg = ac->cb_arg;
grpc_alarm_cancel(&ac->alarm);
gpr_mu_lock(&ac->mu); gpr_mu_lock(&ac->mu);
if (success) { if (success) {
do { do {
...@@ -178,8 +180,6 @@ finish: ...@@ -178,8 +180,6 @@ finish:
if (done) { if (done) {
gpr_mu_destroy(&ac->mu); gpr_mu_destroy(&ac->mu);
gpr_free(ac); gpr_free(ac);
} else {
grpc_alarm_cancel(&ac->alarm);
} }
cb(cb_arg, ep); cb(cb_arg, ep);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment