add checks validation MinRequestTimeout of ServerRunOptions

This commit is contained in:
hangaoshuai 2018-04-26 16:02:31 +08:00
parent 50dd920837
commit ba20be9911

View File

@ -103,6 +103,10 @@ func (s *ServerRunOptions) Validate() []error {
errors = append(errors, fmt.Errorf("--request-timeout can not be negative value"))
}
if s.MinRequestTimeout < 0 {
errors = append(errors, fmt.Errorf("--min-request-timeout can not be negative value"))
}
return errors
}