mirror of
https://github.com/greatest-ape/aquatic.git
synced 2026-08-29 07:08:20 +00:00
aquatic_ws: move comment on empty info hashes to network.rs
This commit is contained in:
@@ -282,8 +282,6 @@ pub fn handle_scrape_request(
|
||||
&mut torrent_maps.ipv6
|
||||
};
|
||||
|
||||
// If request.info_hashes is empty, don't return scrape for all
|
||||
// torrents, even though reference server does it. It is too expensive.
|
||||
for info_hash in info_hashes.into_iter().take(num_to_take) {
|
||||
if let Some(torrent_data) = torrent_map.get(&info_hash) {
|
||||
let stats = ScrapeStatistics {
|
||||
|
||||
@@ -305,6 +305,8 @@ impl Connection {
|
||||
let info_hashes = if let Some(info_hashes) = info_hashes {
|
||||
info_hashes
|
||||
} else {
|
||||
// If request.info_hashes is empty, don't return scrape for all
|
||||
// torrents, even though reference server does it. It is too expensive.
|
||||
let out_message = OutMessage::ErrorResponse(ErrorResponse {
|
||||
action: Some(ErrorResponseAction::Scrape),
|
||||
failure_reason: "Full scrapes are not allowed".into(),
|
||||
|
||||
Reference in New Issue
Block a user