mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp load test: don't generate announce requests with port 0
This commit is contained in:
parent
bbb4c5e411
commit
f2d063d6a6
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use std::io::Cursor;
|
||||
use std::net::SocketAddr;
|
||||
use std::num::NonZeroU16;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::time::Duration;
|
||||
|
||||
|
|
@ -192,7 +193,7 @@ impl Worker {
|
|||
scrape_hash_indices,
|
||||
connection_id,
|
||||
peer_id: generate_peer_id(),
|
||||
port: Port::new(self.rng.gen()),
|
||||
port: Port::new(self.rng.gen::<NonZeroU16>().into()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue