fix(network): set so_linger socket option to match cardano-node (#369)

This commit is contained in:
Andrew Westberg 2024-01-03 06:28:52 -05:00 committed by GitHub
parent caef9d9c34
commit 57d84fe1e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,7 @@ impl Bearer {
tcp_keepalive = tcp_keepalive.with_interval(tokio::time::Duration::from_secs(20));
sock_ref.set_tcp_keepalive(&tcp_keepalive)?;
sock_ref.set_nodelay(true)?;
sock_ref.set_linger(Some(std::time::Duration::from_secs(0)))?;
Ok(())
}