refactor: remove set_reuse_address for udpsocket

This commit is contained in:
Jun Kurihara 2023-07-30 09:53:44 +09:00
commit 892f5f89e0
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03

View file

@ -32,7 +32,7 @@ pub(super) fn bind_udp_socket(listening_on: &SocketAddr) -> Result<UdpSocket> {
} else {
Socket::new(Domain::IPV4, Type::DGRAM, Some(Protocol::UDP))
}?;
socket.set_reuse_address(true)?;
// socket.set_reuse_address(true)?; // This isn't necessary
socket.set_reuse_port(true)?;
if let Err(e) = socket.bind(&(*listening_on).into()) {