lan_discovery_WOL: fix udp set_nonblocking twice and lan refactor

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-07-15 20:39:42 +08:00
parent 13406cd359
commit 3613f27afc
5 changed files with 298 additions and 279 deletions

View File

@@ -37,7 +37,6 @@ fn new_socket(addr: SocketAddr, reuse: bool, buf_size: usize) -> Result<Socket,
addr,
socket.recv_buffer_size()
);
socket.set_nonblocking(true)?;
socket.bind(&addr.into())?;
Ok(socket)
}