prevent double registration of sockets when backpressure is resolved

This commit is contained in:
Rob Ede 2020-12-04 23:26:25 +00:00
parent ab496a71b5
commit 85ccf3a50a
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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 {