mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp: consistently use NonZeroU16 for announce request port
This commit is contained in:
parent
b4e27903dc
commit
3513b714b4
8 changed files with 18 additions and 14 deletions
|
|
@ -5,6 +5,7 @@ use common::*;
|
|||
use std::{
|
||||
collections::{hash_map::RandomState, HashSet},
|
||||
net::{Ipv4Addr, SocketAddr, SocketAddrV4, UdpSocket},
|
||||
num::NonZeroU16,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
|
|
@ -45,7 +46,7 @@ fn test_multiple_connect_announce_scrape() -> anyhow::Result<()> {
|
|||
&socket,
|
||||
tracker_addr,
|
||||
connection_id,
|
||||
PEER_PORT_START + i as u16,
|
||||
NonZeroU16::new(PEER_PORT_START + i as u16).unwrap(),
|
||||
info_hash,
|
||||
PEERS_WANTED,
|
||||
is_seeder,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue