Sfoglia il codice sorgente

etcd: do not generate id if next state is stop

Xiang Li 11 anni fa
parent
commit
46eab903e9
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      etcd/etcd.go

+ 3 - 1
etcd/etcd.go

@@ -215,7 +215,9 @@ func (s *Server) Run() error {
 		default:
 			panic("unsupport mode")
 		}
-		s.id = genId()
+		if next != stopMode {
+			s.id = genId()
+		}
 	}
 }