diff --git a/aquatic_udp/src/workers/swarm/mod.rs b/aquatic_udp/src/workers/swarm/mod.rs index 2c054b3..bc0003f 100644 --- a/aquatic_udp/src/workers/swarm/mod.rs +++ b/aquatic_udp/src/workers/swarm/mod.rs @@ -163,8 +163,8 @@ fn handle_announce_request( AnnounceResponse { transaction_id: request.transaction_id, announce_interval: AnnounceInterval(config.protocol.peer_announce_interval), - leechers: NumberOfPeers(torrent_data.num_leechers() as i32), - seeders: NumberOfPeers(torrent_data.num_seeders() as i32), + leechers: NumberOfPeers(torrent_data.num_leechers().try_into().unwrap_or(i32::MAX)), + seeders: NumberOfPeers(torrent_data.num_seeders().try_into().unwrap_or(i32::MAX)), peers: response_peers, } }