diff --git a/actix-server/CHANGES.md b/actix-server/CHANGES.md index 5011f69c..5e28fe0b 100644 --- a/actix-server/CHANGES.md +++ b/actix-server/CHANGES.md @@ -2,6 +2,10 @@ ## Unreleased - 2020-xx-xx * Added explicit info log message on accept queue pause. [#215] +* Prevent double registration of sockets when back-pressure is resolved. [#223] + +[#215]: https://github.com/actix/actix-net/pull/215 +[#223]: https://github.com/actix/actix-net/pull/223 ## 1.0.4 - 2020-09-12 diff --git a/actix-server/src/accept.rs b/actix-server/src/accept.rs index 39da03bc..bef175d8 100644 --- a/actix-server/src/accept.rs +++ b/actix-server/src/accept.rs @@ -370,6 +370,11 @@ impl Accept { if !on { self.backpressure = false; for (token, info) in self.sockets.iter() { + if info.timeout.is_some() { + // socket will attempt to re-register itself when its timeout completes + continue; + } + if let Err(err) = self.register(token, info) { error!("Can not resume socket accept process: {}", err); } else {