mirror of
https://github.com/htrefil/rkvm.git
synced 2024-12-27 09:58:13 +01:00
Disable TCP linger
This commit is contained in:
parent
7cc34c7e26
commit
27187ccd73
2 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,8 @@ pub async fn run(
|
|||
_ => unimplemented!("Unhandled rustls ServerName variant: {:?}", hostname),
|
||||
};
|
||||
|
||||
stream.set_linger(None).map_err(Error::Network)?;
|
||||
|
||||
log::info!("Connected to server");
|
||||
|
||||
let stream = connector
|
||||
|
|
|
@ -141,6 +141,8 @@ async fn client(
|
|||
password: &str,
|
||||
) -> Result<(), ClientError> {
|
||||
let negotiate = async {
|
||||
stream.set_linger(None)?;
|
||||
|
||||
let stream = acceptor.accept(stream).await?;
|
||||
log::info!("{}: TLS connected", addr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue