mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
use server backlog
This commit is contained in:
parent
9680423025
commit
eae48f9612
@ -83,12 +83,12 @@ where
|
|||||||
HttpServer {
|
HttpServer {
|
||||||
factory,
|
factory,
|
||||||
host: None,
|
host: None,
|
||||||
backlog: 2048,
|
|
||||||
config: Arc::new(Mutex::new(Config {
|
config: Arc::new(Mutex::new(Config {
|
||||||
keep_alive: KeepAlive::Timeout(5),
|
keep_alive: KeepAlive::Timeout(5),
|
||||||
client_timeout: 5000,
|
client_timeout: 5000,
|
||||||
client_shutdown: 5000,
|
client_shutdown: 5000,
|
||||||
})),
|
})),
|
||||||
|
backlog: 1024,
|
||||||
sockets: Vec::new(),
|
sockets: Vec::new(),
|
||||||
builder: Some(ServerBuilder::default()),
|
builder: Some(ServerBuilder::default()),
|
||||||
_t: PhantomData,
|
_t: PhantomData,
|
||||||
@ -114,8 +114,9 @@ where
|
|||||||
/// Generally set in the 64-2048 range. Default value is 2048.
|
/// Generally set in the 64-2048 range. Default value is 2048.
|
||||||
///
|
///
|
||||||
/// This method should be called before `bind()` method call.
|
/// This method should be called before `bind()` method call.
|
||||||
pub fn backlog(mut self, num: i32) -> Self {
|
pub fn backlog(mut self, backlog: i32) -> Self {
|
||||||
self.backlog = num;
|
self.backlog = backlog;
|
||||||
|
self.builder = Some(self.builder.take().unwrap().backlog(backlog));
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user