1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 02:21:07 +01:00

prevent double registration of sockets when backpressure is resolved (#223)

This commit is contained in:
Rob Ede 2020-12-12 17:19:20 +00:00 committed by GitHub
parent ab496a71b5
commit 93889776c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## Unreleased - 2020-xx-xx ## Unreleased - 2020-xx-xx
* Added explicit info log message on accept queue pause. [#215] * 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 ## 1.0.4 - 2020-09-12

View File

@ -370,6 +370,11 @@ impl Accept {
if !on { if !on {
self.backpressure = false; self.backpressure = false;
for (token, info) in self.sockets.iter() { 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) { if let Err(err) = self.register(token, info) {
error!("Can not resume socket accept process: {}", err); error!("Can not resume socket accept process: {}", err);
} else { } else {