mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2599 from yichengq/etcd-tester
tools/etcd-agent: stop etcd only if it is running when cleanup
This commit is contained in:
commit
ee2833111d
@ -73,6 +73,9 @@ func (a *Agent) start(args ...string) error {
|
||||
|
||||
// stop stops the existing etcd process the agent started.
|
||||
func (a *Agent) stop() error {
|
||||
if a.state != stateStarted {
|
||||
return nil
|
||||
}
|
||||
err := a.cmd.Process.Kill()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user