Merge pull request #14163 from chavacava/fix-14161

fix #14161
This commit is contained in:
Benjamin Wang 2022-06-26 12:43:06 +08:00 committed by GitHub
commit f99c68839f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,14 +112,14 @@ func TestDialTimeout(t *testing.T) {
for i, cfg := range testCfgs {
donec := make(chan error, 1)
go func(cfg Config) {
go func(cfg Config, i int) {
// without timeout, dial continues forever on ipv4 black hole
c, err := NewClient(t, cfg)
if c != nil || err == nil {
t.Errorf("#%d: new client should fail", i)
}
donec <- err
}(cfg)
}(cfg, i)
time.Sleep(10 * time.Millisecond)