clientv3: don't hold client lock while dialing
Causes async reconnect to block while the client is dialing. This was also causing problems with the Close error message, so now Close() will return the last dial error (if any) instead of clearing it out with a cancel(). Fixes #5416
This commit is contained in:
@ -74,7 +74,7 @@ func TestTxnWriteFail(t *testing.T) {
|
||||
|
||||
dialTimeout := 5 * time.Second
|
||||
select {
|
||||
case <-time.After(2*dialTimeout + time.Second):
|
||||
case <-time.After(dialTimeout + time.Second):
|
||||
t.Fatalf("timed out waiting for txn to fail")
|
||||
case <-donec:
|
||||
// don't restart cluster until txn errors out
|
||||
|
Reference in New Issue
Block a user