src/bin/proxmox-backup-proxy.rs: set socket options for max. performance
This commit is contained in:
parent
93f8bb0445
commit
74d0a6bc23
@ -95,7 +95,12 @@ fn run() -> Result<(), Error> {
|
|||||||
let connections = listener
|
let connections = listener
|
||||||
.incoming()
|
.incoming()
|
||||||
.map_err(Error::from)
|
.map_err(Error::from)
|
||||||
.and_then(move |sock| acceptor.accept(sock).map_err(|e| e.into()))
|
.and_then(move |sock| {
|
||||||
|
sock.set_nodelay(true).unwrap();
|
||||||
|
sock.set_send_buffer_size(1024*1024).unwrap();
|
||||||
|
sock.set_recv_buffer_size(1024*1024).unwrap();
|
||||||
|
acceptor.accept(sock).map_err(|e| e.into())
|
||||||
|
})
|
||||||
.then(|r| match r {
|
.then(|r| match r {
|
||||||
// accept()s can fail here with an Err() when eg. the client rejects
|
// accept()s can fail here with an Err() when eg. the client rejects
|
||||||
// the cert and closes the connection, so we follow up with mapping
|
// the cert and closes the connection, so we follow up with mapping
|
||||||
|
Loading…
Reference in New Issue
Block a user