From 3af8c7da3c14b2fc2bc9c3d237447b67b3da9b1e Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 8 Aug 2014 18:52:10 -0700 Subject: [PATCH] etcd: we should trust people --- etcd/etcd.go | 3 --- etcd/etcd_start_test.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) 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)