1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 19:12:56 +01:00

do no drain backlog on backpressure (#322)

This commit is contained in:
fakeshadow 2021-04-08 15:15:10 -07:00 committed by GitHub
parent 5961eb892e
commit d4829b046d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -407,7 +407,7 @@ impl Accept {
} }
fn accept(&mut self, sockets: &mut Slab<ServerSocketInfo>, token: usize) { fn accept(&mut self, sockets: &mut Slab<ServerSocketInfo>, token: usize) {
loop { while !self.backpressure {
let info = sockets let info = sockets
.get_mut(token) .get_mut(token)
.expect("ServerSocketInfo is removed from Slab"); .expect("ServerSocketInfo is removed from Slab");