diff --git a/etcd/etcd.go b/etcd/etcd.go index 0311373e6..d4659af62 100644 --- a/etcd/etcd.go +++ b/etcd/etcd.go @@ -115,9 +115,6 @@ func (s *Server) SetTick(tick time.Duration) { // Stop stops the server elegently. func (s *Server) Stop() { - if s.mode.Get() == stopMode { - return - } s.mu.Lock() s.stopped = true switch s.mode.Get() { diff --git a/etcd/etcd_start_test.go b/etcd/etcd_start_test.go index a9fd53cbf..7f1d374c4 100644 --- a/etcd/etcd_start_test.go +++ b/etcd/etcd_start_test.go @@ -190,7 +190,7 @@ func buildServer(t *testing.T, c *config.Config, id int64) (e *Server, h *httpte break } if err != nil { - destroyServer(t, e, h) + h.Close() return nil, nil, err } time.Sleep(10 * time.Millisecond)