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 83f9ea712b
commit ad8491fe24

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(())
}