Browse Source

etcd: we should trust people

Xiang Li 11 years ago
parent
commit
3af8c7da3c
2 changed files with 1 additions and 4 deletions
  1. 0 3
      etcd/etcd.go
  2. 1 1
      etcd/etcd_start_test.go

+ 0 - 3
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() {

+ 1 - 1
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)