mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
embed: don't compare uint to any negative number (#11603)
This commit is contained in:
parent
4c25efc1f8
commit
e5c90ebf90
@ -561,10 +561,10 @@ func (cfg *Config) Validate() error {
|
||||
return ErrConflictBootstrapFlags
|
||||
}
|
||||
|
||||
if cfg.TickMs <= 0 {
|
||||
if cfg.TickMs == 0 {
|
||||
return fmt.Errorf("--heartbeat-interval must be >0 (set to %dms)", cfg.TickMs)
|
||||
}
|
||||
if cfg.ElectionMs <= 0 {
|
||||
if cfg.ElectionMs == 0 {
|
||||
return fmt.Errorf("--election-timeout must be >0 (set to %dms)", cfg.ElectionMs)
|
||||
}
|
||||
if 5*cfg.TickMs > cfg.ElectionMs {
|
||||
|
Loading…
x
Reference in New Issue
Block a user