1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-26 11:31:09 +00:00

use server backlog

This commit is contained in:
Nikolay Kim 2019-03-11 15:26:05 -07:00
parent 9680423025
commit eae48f9612

View file

@ -83,12 +83,12 @@ where
HttpServer {
factory,
host: None,
backlog: 2048,
config: Arc::new(Mutex::new(Config {
keep_alive: KeepAlive::Timeout(5),
client_timeout: 5000,
client_shutdown: 5000,
})),
backlog: 1024,
sockets: Vec::new(),
builder: Some(ServerBuilder::default()),
_t: PhantomData,
@ -114,8 +114,9 @@ where
/// Generally set in the 64-2048 range. Default value is 2048.
///
/// This method should be called before `bind()` method call.
pub fn backlog(mut self, num: i32) -> Self {
self.backlog = num;
pub fn backlog(mut self, backlog: i32) -> Self {
self.backlog = backlog;
self.builder = Some(self.builder.take().unwrap().backlog(backlog));
self
}