internal/stubserver: Close Client Conn in error handling of Start (#6174)

This commit is contained in:
Mskxn 2023-04-12 03:10:38 +08:00 committed by GitHub
parent 06de8f851e
commit 6237dfe701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -133,6 +133,7 @@ func (ss *StubServer) StartClient(dopts ...grpc.DialOption) error {
ss.R.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: ss.Address}}})
}
if err := waitForReady(cc); err != nil {
cc.Close()
return err
}