etcd: do not generate id if next state is stop

release-2.0
Xiang Li 2014-08-01 21:02:18 -07:00 committed by Yicheng Qin
parent 0197ce4c66
commit 46eab903e9
1 changed files with 3 additions and 1 deletions

View File

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