mirror of https://github.com/grpc/grpc-go.git
stubserver: Stop server when StartClient failed (#6190)
This commit is contained in:
parent
7dfd71831d
commit
ca604628aa
|
@ -86,7 +86,11 @@ func (ss *StubServer) Start(sopts []grpc.ServerOption, dopts ...grpc.DialOption)
|
|||
if err := ss.StartServer(sopts...); err != nil {
|
||||
return err
|
||||
}
|
||||
return ss.StartClient(dopts...)
|
||||
if err := ss.StartClient(dopts...); err != nil {
|
||||
ss.Stop()
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// StartServer only starts the server. It does not create a client to it.
|
||||
|
|
Loading…
Reference in New Issue