etcd: do not generate id if next state is stop

This commit is contained in:
Xiang Li 2014-08-01 21:02:18 -07:00 committed by Yicheng Qin
parent 0197ce4c66
commit 46eab903e9

View File

@ -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()
}
} }
} }