Browse Source

etcd: do not generate id if next state is stop

Xiang Li 11 years ago
parent
commit
46eab903e9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      etcd/etcd.go

+ 3 - 1
etcd/etcd.go

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