From d4829b046defc6466045aeeff3c18f5b495b579a Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Thu, 8 Apr 2021 15:15:10 -0700 Subject: [PATCH] do no drain backlog on backpressure (#322) --- actix-server/src/accept.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actix-server/src/accept.rs b/actix-server/src/accept.rs index 5b6345cc..2463ce47 100644 --- a/actix-server/src/accept.rs +++ b/actix-server/src/accept.rs @@ -407,7 +407,7 @@ impl Accept { } fn accept(&mut self, sockets: &mut Slab, token: usize) { - loop { + while !self.backpressure { let info = sockets .get_mut(token) .expect("ServerSocketInfo is removed from Slab");