Ensure that every udp socket can connect at the same time
This commit is contained in:
parent
6c6681d579
commit
ee415c63f0
1 changed files with 2 additions and 2 deletions
|
|
@ -199,7 +199,7 @@ where
|
|||
) -> Result<(), Self::Error> {
|
||||
if let SocketAddr::V4(remote) = remote {
|
||||
// TODO dynamically select a random port
|
||||
socket.open(&mut self.bus, 49849)?; // chosen by fair dice roll.
|
||||
socket.open(&mut self.bus, 49849 + u16::from(socket.socket.index))?; // chosen by fair dice roll.
|
||||
// guaranteed to be random.
|
||||
socket.set_destination(&mut self.bus, remote)?;
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue