commit | 8c798927d70a1d48f5a320924caa63667fb086a2 | [log] [tgz] |
---|---|---|
author | Menghan Li <menghanl@google.com> | Thu Nov 02 09:56:04 2017 -0700 |
committer | Menghan Li <menghanl@google.com> | Fri Nov 03 11:24:06 2017 -0700 |
tree | 6ec7b7ba9bb5bb67fe0199e10bfdcfe0d1769da1 | |
parent | aa1512a128a030863ad80a32ea039cb2a938e691 [diff] |
Check ac state shutdown before setting it to TransientFailure (#1643)
diff --git a/clientconn.go b/clientconn.go index 886bead..5462062 100644 --- a/clientconn.go +++ b/clientconn.go
@@ -1011,6 +1011,10 @@ default: } ac.mu.Lock() + if ac.state == connectivity.Shutdown { + ac.mu.Unlock() + return + } // Set connectivity state to TransientFailure before calling // resetTransport. Transition READY->CONNECTING is not valid. ac.state = connectivity.TransientFailure