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,8 +199,8 @@ where
|
||||||
) -> Result<(), Self::Error> {
|
) -> Result<(), Self::Error> {
|
||||||
if let SocketAddr::V4(remote) = remote {
|
if let SocketAddr::V4(remote) = remote {
|
||||||
// TODO dynamically select a random port
|
// 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.
|
// guaranteed to be random.
|
||||||
socket.set_destination(&mut self.bus, remote)?;
|
socket.set_destination(&mut self.bus, remote)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue