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:
Xiang Li 2015-03-29 21:07:24 -07:00
commit ee2833111d

View File

@ -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