diff --git a/actix-server/CHANGES.md b/actix-server/CHANGES.md index 067adcd6..7111fb0b 100644 --- a/actix-server/CHANGES.md +++ b/actix-server/CHANGES.md @@ -1,5 +1,11 @@ # Changes +## Unreleased + +### Changed + +* workers must be greater than 0 + ## [1.0.3] - 2020-05-19 ### Changed diff --git a/actix-server/src/builder.rs b/actix-server/src/builder.rs index f3f6ad86..8a90d598 100644 --- a/actix-server/src/builder.rs +++ b/actix-server/src/builder.rs @@ -72,8 +72,9 @@ impl ServerBuilder { /// Set number of workers to start. /// /// By default server uses number of available logical cpu as workers - /// count. + /// count. Workers must be greater than 0. pub fn workers(mut self, num: usize) -> Self { + assert_ne!(num, 0, "workers must be greater than 0"); self.threads = num; self }