netapp.rs: Set SO_REUSEPORT_LB on FreeBSD.

This commit is contained in:
Jonathan Davies 2023-05-21 20:07:32 +01:00
parent a1f0985638
commit dc358ebcf8

View file

@ -210,6 +210,11 @@ impl NetApp {
.set_reuseport(true) .set_reuseport(true)
.expect("Unable to set SO_REUSEPORT on socket"); .expect("Unable to set SO_REUSEPORT on socket");
#[cfg(target_os = "freebsd")]
listen_addr_socket
.set_reuseport_lb(true)
.expect("Unable to set SO_REUSEPORT_LB on socket");
listen_addr_socket listen_addr_socket
.bind(listen_addr) .bind(listen_addr)
.expect("Unable to bind on listen_addr socket"); .expect("Unable to bind on listen_addr socket");